Created
December 25, 2009 23:07
-
-
Save ELLIOTTCABLE/263778 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These are just a few ideas. The first is supported by the current concept; | |
# it’s a bit like heredocs in other languages, only for blocks instead of | |
# strings. And it’s dependent on meaningful indentation. | |
# The second essentially involves falling back to curly braces when meaningful | |
# whitespace breaks down; I’m not a huge fan of that. | |
# The third is a radical system involving Unicode box-drawing characters… it’s | |
# certainly *insane* enough to fit in well with the rest of Paws’ insanity. | |
# Unfortunately, it doesn’t play well with dumb editors; how useful is a | |
# language that’s only editable from within an intelligent editor? That’s no | |
# better, really, than a language that is useless without an IDE. (Looking at | |
# you, Java, C++, and Cocoa…) | |
scope | |
my.func(foo : 123, a.result ? function, bar : 456) | |
# contents of a.result | |
# more contents of a.result | |
# stuff after the call to my.func | |
my.func(foo : 123, a.result ? function, a.callback : function, bar : 456) | |
# contents of a.callback | |
# more contents of a.callback | |
# a.result will be an empty function, as there is no syntactic way to define statements for it | |
# stuff after the call to my.func | |
# --- -- --- /!\ --- -- --- # | |
my.func(foo : 123, a.result ? { | |
# contents of a.result | |
# the initial indentation here is meaningless; brackets override all indentation up to this point | |
# (so this is still a child of the scope at the top, as are all the statements that continue after this function) | |
}, bar : 456) | |
# stuff after the call to my.func | |
my.func(foo : 123, a.result ? { | |
# contents of a.result | |
# the initial indentation here is meaningless; brackets override all indentation up to this point | |
# (so this is still a child of the scope at the top, as are all the statements that continue after this function) | |
}, a.callback : { | |
# contents of a.callback | |
# more contents of a.callback | |
}, bar : 456) | |
# stuff after the call to my.func | |
# --- -- --- /!\ --- -- --- # | |
my.func(foo : 123, a.result ? function, bar : 456) | |
┬ # contents of a.result | |
└ # more contents of a.result | |
# stuff after the call to my.func | |
my.func(foo : 123, a.result ? function, a.callback : function, bar : 456) | |
┬ # contents of a.result | |
└ # more contents of a.result | |
┬ # contents of a.callback | |
│ # initial indentation is meaningless here, as well, because the box drawing characters explicitly define the level | |
└ # more contents of a.callback | |
# stuff after the call to my.func | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment