4 ms·
Lispers rightly tout the malleability of the syntax as a killer feature. The big problem is that any language you build in lisp is still pretty much lisp. If yo
by cageface 16y ago
Lispers rightly tout the malleability of the syntax as a killer feature. The big problem is that any language you build in lisp is still pretty much lisp. If you're not already sold on s-expr syntax, and a lot of programmers, rightly or wrongly, don't like it, the fact that you can replace one s-expr syntax with another just isn't that convincing.
The irony here is that lisp's syntax will probably keep it from ever falling into obsolescence because it can adapt to any new general task but it will also prevent it from ever really breaking into the mainstream because for any particular task it's a non-optimal syntax and a steady procession of more specialized alternatives suit most people's needs better.
- aerique 16y agoFor the particular task of list processing its syntax is pretty optimal ;-)
- nathanmarz 16y agoI'll admit that learning to be effective with Lisp's syntax took me a few months. It's a matter of getting used to that way of thinking about programming. Now that I'm fluent, I strongly prefer the s-expression style for most problems. The uniformity of Clojure means that I can use the sequence library for an unbelievable variety of tasks. And I love that operations like "+" are just like any other function and can be passed around. Another important point is that when you make a DSL in Lisp, that DSL can interoperate with all your other DSL's.
- cageface 16y agoI programmed pretty heavily in Common Lisp from about 2000-2003 and I got over the parentheses too after a few months. I can't say I ever really came to love the syntax though. I always thought of it as the price I had to pay for macros. I did get pretty tired of the religious zeal of a lot of lispers though. Too many insist that lisp is the "right" way to design a language and refuse to see it as the collection of design compromises it is, like every other language.
- jimbokun 16y agoWhat tool do you use to build an optimal syntax for all your needs?
- cageface 16y agoI'm increasingly suspicious of DSLs. Mostly I work in languages like Scala or Ruby with a syntax that's expressive enough for almost anything as it is and avoid building DSLs on top of them. You can cover a lot of ground in any language that allows higher order functions and function, sequence and hash literals. Syntax matters but it seems to have become a bit of an obsession lately.
- statictype 16y agoDSLs aren't just about the curly braces and lambdas. It's also about reducing the amount of boilerplate code required to achieve some task. You can do this with higher order functions and objects but only to a certain extent. If you find that your language still requires boilerplate code to implement features in whatever domain you're working in, then perhaps it's time to get a new language - or write a DSL.
- cageface 16y agoAgreed, but I just don't find myself writing much boilerplate in modern languages. The other abstraction mechanisms take care of most of it.