2 ms·
I think this would be easier to do if they would improve Ruby's syntax to have all expressions be enclosed in 2 delimiter characters of some kind (the first wo
by rplevy 18y ago
I think this would be easier to do if they would improve Ruby's syntax to have all expressions be enclosed in 2 delimiter characters of some kind (the first would signify the beginning of an expression and the second would close it). Expressions can of course be nested. For calling functions, the first element in the set would be the symbol the function is bound to, and the other elements would be its arguments. This way functions and data would have the same notation. These simple changes to Ruby's syntax would make rewriting or generating expressions, whether at compile time or during run time, much more graceful.
- etal 18y agoSounds like a brilliant Scheme to me.
- jsmcgd 18y agoLiking interesting syntax proposition.
- gregwebs 18y agovalid ruby >> (def foo a, b >> (a + b) >> end) => nil >> (foo 1, 2) => 3
- jsmcgd 18y agoAlmost s-expressions apart from the comma delimiter, infix notation and arguably superfluous end statement.
- richcollins 18y agoYou mean like this? http://iolanguage.com/scm/git/checkout/Io/docs/IoGuide.html#Syntax-Expressions http://iolanguage.com/scm/git/checkout/Io/docs/IoGuide.html#...