Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Framing it as addiction was a mistake, but the intention is accurate: S-expressions are weird when you're used to C-like languages until they're not. You have to push yourself long enough to get used to them, and most people don't want to do that. Once you do, everything makes sense.

What did it for me is realising that after some time, you don't pay attention to the parentheses. Identation in lisps is semantic, which looks weird when you're used to one level at a time. But try using a sensible formatter (e.g. Clojure's cljfmt, Racket's fixw). They will show you good ways to format your code, making it very readable, parentheses and all.

Then you get used to structural editing with Paredit or vim-sexp, and you're sold on S-expresssions.



Maybe an "acquired taste" is a better metaphor, like stinky cheese, sour beers, and Captain Beefheart & The Magic Band.


That is a terrible metaphor, because it is dismissive and implies that there is really no difference between LISP and other languages.

I repeatedly hear smart and productive people say LISP is special because of macros. Personally I think we all should try to listen, and not miss out on learning something important, when very smart people keep repeating similar messages.

I believe the power of LISP macros causes one cost and one risk.

The cost: source code is a regular tree of data with only one type of node and a few primitive types of leaves. This heavily restricts syntax, and people unfamiliar with the reason behind the syntax choices find the syntax ugly.

The risk: the power of macro transformations can make code completely unreadable. Writing macros is not for low skilled programmers or developers without good taste. Macros allow customisation, but that power can be used well or badly. LISP lacks safety features, and its power makes it trivial to code footguns (or much worse). In return you get productivity, if you and your team are wise enough to use the power for good!

Basically macros restricts syntax choices but gifts semantic choices in return.

A simple example: in most imperative languages from the code you can tell when a function is being called. In LISP with macros you can't (although I would guess each codebase will have semantic and stylistic (non-syntax) norms that would help you).

Disclaimer: I don't program in LISP so much of the above is academic.


> Disclaimer: I don't program in LISP so much of the above is academic.

I don't mean to be disrespectful, but what's the point of the above post if you don't use Lisp? I've been writing Lisp at the hobby level for a few years now, and my opinion is my own.

I also think you misread what I wrote. Lisp and s-expressions are weird. That they take some time to get comfortable with (an "acquired taste") is both my personal opinion, obtained from my own experience, and is also generally accepted among Lisp users that I've spoken to. It's hardly dismissive.


Oh, sorry, I'm an idiot. I completely misconstrued what you wrote, as well as the other replies. I do try not to jump to conclusions!


See also: exercise


Haha I think you right !


I don’t know if it helps, but I used reverse Polish notation calculators before doing much lisp. To this day for little calculations I will either type an Elisp expression into my eMacs scratch buffer or if i am out and about will use my HP 15C app in my phone. Even if I am transcribing from an infix thing it is easier. The reverse means no paren, which is easier.


Yea 100% accurate. Sorry English not my first language.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: