2 ms·
> Lisp syntax fails spectacularly on this one, it's painful and tedious, To the contrary, Lisp syntax is much simpler than traditional syntax. It does not dra
by lisper 4y ago
> Lisp syntax fails spectacularly on this one, it's painful and tedious,
To the contrary, Lisp syntax is much simpler than traditional syntax. It does not draw an arbitrary distinction between operators and functions. Operators are a notational hack. We write sin(x), sqrt(x), log(x), so why not sum(x,y), expt(x,y), xor(x,y)?
> it forces you think about the explicit nesting between structures
Traditional syntax forces you to think about operator precedence. It's also much harder to parse.
> Haskell lets you design your own control structures with lazy evaluation.
Lisp lets you do the same thing with macros and closures.
> Perl6\Raku has first class support for BNF grammars built right into the language.
Why would you want that? What benefit is there over having parsers available as library code?
> beats Lisps in dynamicity
> Plenty of others can
I think you're missing the point. The reason Lisp is cool is not that it has the most powerful version of any given feature (except for CLOS -- that is indeed still unmatched). The reason Lisp is cool is that it gives you the right combination of all of these things packaged in a way that is, at its core, very simple and easy to learn. Nothing else comes close in terms of power-to-learning-curve ratio.
- lizmat 4y ago>> Perl6\Raku has first class support for BNF grammars built right into the language. > Why would you want that? What benefit is there over having parsers available as library code? Because in Raku, grammars are really classes. So you can actually use roles and inheritance to build your grammar. And at the lower level in Raku, rules, tokens and regexes are just executable code (method on the grammar), so you can wrap them if need be. And they have all of the optimization opportunities (such as inlining) as all of the other executable code.