7 ms·
> 1 - All those parenthesis. (Still a top objection) If you actually count parens fairly you will find that Lisp has no more than any other language, it's just
by lisper 10y ago
> 1 - All those parenthesis. (Still a top objection)
If you actually count parens fairly you will find that Lisp has no more than any other language, it's just that other languages use a mix of parens, square brackets and curly braces whereas Lisp only uses parens. Also, if you really don't like parens, you can get rid of a lot of them using macros. See e.g.:
https://github.com/rongarret/ergolib https://github.com/rongarret/ergolib
and in particular the binding-block (BB) construct.
> 2 - Lisp doesn't look like or work like what I'm used to.
Neither does anything else until you get used to it.
> 3 - Lisp doesn't have as many libraries as the most popular mainstream programming languages.
That used to be one of my objections, but it's simply not true any more. And with Quicklisp accessing the (very large) collection of available libraries is incredibly convenient. (Thanks Zach!)
> 4 - There aren't nearly as many Lisp programmers, so it'll be hard to find more to join your project/company if you use Lisp.
That becomes a self-fulfilling prophecy. But it's no harder to create new Lisp programmers than it is to create new X programmers for any other value of X.
> 5 - There aren't nearly as many Lisp jobs, so why bother learning Lisp if you're going to have a hard time finding work using it?
Because knowing Lisp is a huge lever for learning other languages. Once you know Lisp everything else becomes a lot easier to learn (but a lot more frustrating too because now you will be aware of the shortcomings of other languages).
> 6 - Lisp is ancient, and anything that old is useless and primitive compared to new and shiny languages.
Chasing the shiny new thing is usually a mistake. Most old things suck simply because most things suck in general. But the things that don't suck continue to not suck even after they become old. In fact, standing the test of time is one of the defining characteristics of non-sucky things.
- ue_ 10y agoThe part about lisp being primitive was rather silly. Many languages don't have anything close to what Lisp has in its macro system, not even other functional languages, even in those languages with temperating systems. Perhaps Perl 6 comes close (I haven't had the chance to use p6 macros yet) but to say that lisp is 'primitive' is rubbish, unless you're going to claim that case insensitivity is enough to declare a language primitive.
- brianberns 10y ago>> 1 - All those parenthesis. (Still a top objection) > If you actually count parens fairly you will find that Lisp has no more than any other language Bull. For example, compare the Lisp factorial function from the article: (define (fact x) (if (zero? x) 1 (* x (fact (- x 1))))) with the corresponding F# implementation: let rec fact x = if x = 0 then 1 else x * fact (x - 1) That's 7 vs. 1 pair of parens. Also, the problem isn't just that Lisp has so many parens, but that they nest so deeply and quickly. Five nested levels of parens for factorial alone.
- Roboprog 10y agoTry putting the closing parens on a line aligned with the opening one, as if they were K&R style closing braces (ignoring that open-paren goes before keyword/func-name, rather than after) (define (fact x) (if (zero? x) 1 (* x (fact (- x 1))) ) ) Square brackets work in some dialects, as well: [define (fact x) (if (zero? x) 1 (* x (fact (- x 1 ]
- sigjuice 10y agoAlmost all Lisp code will put the closing parens all together at the end. And the idea is to not care about how many there are by using an editor that provides the appropriate assistance.
- tomjakubowski 10y ago> by using an editor that provides the appropriate assistance. To spell it out: this means Emacs with Paredit, or an imitation thereof.
- krapp 10y agoHaving to depend on an editor to make your code legible seems like a bad thing.
- mark_l_watson 10y ago+1, couldn't agree more. Especially about Quicklisp: Zach had an idea, implemented it, and made the lives of most CL programmers easier.