by gamegoblin · 12y ago · 0 comments
For example, in Haskell (as you know, but readers may not), `1:2:3:4:5:[]` can be written as `[1,2,3,4,5]` which is much prettier than a lot of cons cells (even if we use the infix (:) for cons).
I just looked at TFA and yes, it's truly awful. It doesn't have to be that way. See e.g. https://github.com/m2ym/optima (a pattern matching library for common lisp). I haven't tried it, but I've tried the predecessor of that library.
It's not like people have been building more programs in Lisp than in languages without sexpressions.
"The project of defining M-expressions precisely and compiling them or at least translating them into S-expressions was neither finalized nor explicitly abandoned. It just receded into the indefinite future, and a new generation of programmers appeared who preferred internal notation to any FORTRAN-like or ALGOL-like notation that could be devised." - John McCarthy, History of Lisp
If you're going to market something as an X then it may not be a good call to remove something that many of the people who use X seem to regard as a desirable attribute of it.
So, you could use the "sugared" syntax, and revert to the isomorphic (that's the world?) sexpression syntax when you want to do s-expressy stuff like macros etc.
Of course you'd have to keep in your head the mapping between the sugary and sexpressions version, but it's not that difficult, and you'd only need to do that if you wanted to use sexpressions, not all the time when you don't really need them.