3 ms·
It seems like many of the strengths of Lisp/Scheme are an emergent property of the S-expression syntax, though. Expressions like ((if test func-one func-two) ar
by silentbicycle 18y ago
It seems like many of the strengths of Lisp/Scheme are an emergent property of the S-expression syntax, though. Expressions like ((if test func-one func-two) arg1 arg2 etc) are certainly more awkward with infix notation, for example. Using OO/polymorphism is one way around this, but that's a bit heavy-handed in situations where it's just a workaround for infix syntax. (Duplicated code with a switch or if block is even worse.) Also, macros / code generation are vastly easier with a consistently prefix notation.
Similarly, many of the advantages of stack-based languages like Forth and Factor emerge from postfix notation. Very interesting to compare the two.
It's really too bad that non-C-style syntax freaks people out so much, from a technical standpoint it's almost certainly the worst of the three. </fighting words>
- gruseom 18y agoIt seems like many of the strengths of Lisp/Scheme are an emergent property of the S-expression syntax, though. I agree, and I think your use of the word "emergent" is exactly right: the properties in question were unanticipated, yet orderly and beautiful. This point explains why abortive attempts to "fix" the s-expression syntax are about as old as the syntax itself.