Lisp is a fascinating and very elegant language and every developer can learn something from it but I gave up waiting for the lisp revolution a while ago.
Lisp is a fascinating and very elegant language and every developer can learn something from it but I gave up waiting for the lisp revolution a while ago.
On the other hand, you do have languages like XML which is basically a much more cumbersome syntax for s-expressions.
Google Erik Naggum for an extreme example of this syndrome.
For all practical purposes Lisp doesn't even have a syntax.
The real issue is with programmers who are at beginner and advanced beginner levels all life.
This problem existed with Perl too. Agreed that a lot of text manipulation tasks that existed before the data exchange standards like JSON and XML came around don't exist anymore. The use cases for Perl have reduced. But the overall point stands of course. People are willing to write 100 classes to extract a string from data, than learn to write 10 lines of regex code.
If the only thing you are willing to learn and use is a for loop, if statement and function/class syntax. Anything will look off putting.
Just see how many programmers struggle with concepts like concurrency, pointers, recursion etc. It's just that these people struggle to hold non-trivial concepts in mind.
How can you weigh up the pro or con of a syntax when you haven't used it much? I couldn't tell you whether APL syntax was any good.
For the record I like lots of languages - dependent types are awesome. I find that the language I reach for will mostly be a function of the problem space.
Just an FYI, certain Lisps have static typing as well.
Most of the programmers today have negligible experience with Lisp.
It's also not really elitism. I'm not saying people are stupid. But people take great pain in avoiding reading documentation and understanding anything in general. Which is why I gave the Perl example.
Reading documentation for 30 mins could help you understand the issues and help you fix them at root, instead of hours of Googling. For some reason people do the latter, not the former.
Bad input doesn't always mean that the regexes don't match!
Regexes have a very happy home inside lexical analyzers for tokenizing languages. Lexers define what is correct input and match every case with some regex pattern. If there is no match, then the input doesn't contain a valid token: the lexer can loudly complain (logging an error that can be treated as fatal by the overall compile job), drop an input character and try matching again.
The typical regex solutions in Perl (Awk, ...) scripts go like this: "look for this flimsy, minimal regex somewhere in the stream and assume it's the right thing, then match this other regex in the same line and---woo hoo!--that's our item. Oh, false positives, schmozitives."
Basically, if we were to pin it down to a single difference in principles is that using regexes for searching for something small in something large is different from matching an entire input in its totality (and then getting at the desired parts).
Searching is the quick and dirty thing that's easy to reach for.
• Parens
• Curly braces
• Square brackets (why are they here, if Lisp is just s-exprs?)
• Colon-prefixed symbols
• Quote-prefixed lists
• Functions with names like >!! and ->>
That's pretty obviously syntax. You could argue it doesn't have keywords in the way C-type languages do, but magical functions that are defined as part of the language and should never be changed for all intents and purposes might as well be syntax too. So in the end the difference is kind of academic.
The argument here is lisp has a simple rule. The first element of a list says that what is to be done, the remaining are its inputs. That's really all there is to it(mostly). Using () for everything was really a kind of overloading, which is why I guess they used different opening and closing characters for different contexts.
To be precise, those are just function names, not syntax. But even Clojure having a more complicated syntax than Common Lisp or Scheme is much simpler than Java, for example. Instead of f(x, y) it's (f x y), essentially.