4 ms·
He asked why we need different syntaxes, not languages. Most of what you said doesn't relate to syntax at all.
by Hexstream 18y ago
He asked why we need different syntaxes, not languages. Most of what you said doesn't relate to syntax at all.
- mattmaroon 18y agoHow could you have two different languages with the same syntax? The only thing I can think of is one is a subset of the other.
- qqq 18y agoscheme and common lisp?
- arockwell 18y agoIsn't scheme a subset of common lisp (at least loosely speaking)?
- kragen 18y agoNo, not even close.
- Hexstream 18y agoFor one thing, scheme has continuations, a powerful construct that Common Lisp lacks. But it's true that Common Lisp is generally more "featureful".
- arockwell 18y agoThat's a feature that scheme has that common lisp doesn't, but is this supported by a new syntax? I think that it is not clear cut what is a syntactical difference versus a difference in the feature set. edit: I guess what I'm really asking is there someway in lisp to make a construct that would look just like call/cc? If you could then that's just a feature difference, but if you can't I would agree that's a syntactical difference.
- DougBTX 18y agoSince you can write down all abstract syntax trees using the same syntax, and you can convert most languages into an abstract syntax tree (all the popular ones), it would be easy enough to write down most languages using the same syntax. The real question would be whether that AST syntax would be better than the language's own syntax. I'm guessing it would be harder to read, since a good syntax for an AST would describe only the semantics of the tree, making it harder to pick out the structure of the language itself.