3 ms·
I meant that macros being a little harder to use and the result being a little more restricted is the feature, a small protection against the Lisp Curse (if eve
by ddragon 7y ago
I meant that macros being a little harder to use and the result being a little more restricted is the feature, a small protection against the Lisp Curse (if every custom language is just as good as the base language, then no one can agree what the base language should be). Kinda like newer languages kinda avoid inheritance because while it's powerful, it's kinda easy to misuse (though Elixir special 'using' macro is a fantastic simple way to share behavior between modules).
And while programmable reader macros allow Lisp to have any syntax you want, they go even further in producing heterogeneous environments in which not even the parsing rules are shared. But you can't just only know the algol/infix way of programming in Lisp since you'll have to see other people code and documentation, and when you use these alternate parsers/extensions other people have to understand the quirks of your unique parser/extension before understanding your code. Everyone using the exact same language is definitely a feature, and those languages (and clojure who dropped programmable reader macros and asks people to use macros more judiciously) have a point in their belief.
But as a curiosity, Julia also has it's own version of reader macros [1], which can be used to give it s-expression syntax [2].
[1] https://docs.julialang.org/en/v1/manual/metaprogramming/#Non-Standard-String-Literals-1 https://docs.julialang.org/en/v1/manual/metaprogramming/#Non...
[2] https://github.com/swadey/LispSyntax.jl https://github.com/swadey/LispSyntax.jl
- breck 7y agoI think you’ll appreciate Tree Notation, which is a dead simple “base language”, that I think we will get people to agree on.