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

No, lisp doesn't allow you to specify your own syntax. You can't just start writing stuff without parens and define what that parses to later.


You'd be somewhat surprised on that point. Especially if you just take it such that everything is just trying to build up an s-expression. While the homoiconicity of the language is incredibly cool for macros and whatnot, I don't think you strictly need it. Especially not at the top level. (That is, if you made a language that "compiled" down to s-expressions, what is missing?)

At the extreme end, take a look at Dylan.

Though, I was really referring to your other points. It seemed every one of your "questions" is directly addressed.


But everybody defining their own syntax would not make a language "the perfect language". Quite the opposite, because nobody would be able to understand each other's code anymore. It would be the ultimate fragmented language.

And because of that, I don't think a perfect language is even theoretically possible. Everybody has their own syntactical preferences, and allowing all of them means fragmentation.


Yes, it does. Look for "reader macros" in the Common Lisp spec, do a search for "lisp infix notation", etc.


How do you evaluate Common Lisp's reader macros?




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: