Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How 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.


Since 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.


scheme and common lisp?


Isn't scheme a subset of common lisp (at least loosely speaking)?


For one thing, scheme has continuations, a powerful construct that Common Lisp lacks. But it's true that Common Lisp is generally more "featureful".


That'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.


No, not even close.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: