3 ms·
I've mentioned it before, but maybe If I can help one "almost-lisper": IF the "Syntax / Parenthesis" is the "only" thing that puts you off LISP (I'm sure there
by rawoke083600 3y ago
I've mentioned it before, but maybe If I can help one "almost-lisper":
IF the "Syntax / Parenthesis" is the "only" thing that puts you off LISP (I'm sure there are many other semi-valid reasons), keep pushing. It's a little bit like smoking, most smokers didn't enjoy their first two or three cigarettes, but suddenly one day you realise you addicted and now all other non S-Expr-Languages looks ugly. It's kinda like magic the "sudden switch" from hate-to-love. At least for me :)
YMMV
- noman-land 3y agoAs someone who is semi obsessed with functional/array programming and lisps, framing it as an addiction is a turn off. We should use things because they are good, not because we are unable to stop.
- maleldil 3y agoFraming 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.
- nerdponx 3y agoMaybe an "acquired taste" is a better metaphor, like stinky cheese, sour beers, and Captain Beefheart & The Magic Band.
- rawoke083600 3y agoHaha I think you right !
- __MatrixMan__ 3y agoSee also: exercise
- robocat 3y agoThat 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.
- nerdponx 3y ago> 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.
- rawoke083600 3y agoYea 100% accurate. Sorry English not my first language.
- lanstin 3y agoI 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.
- deleted 3y ago[deleted]
- kazinator 3y agoFor what reason would you be addicted to something like a programming language, other than it being good? It's not physically addictive. Would you be addicted to a video game that sucks? "I want to play a game because it's critically acclaimed and has stunning graphics, not because I can't stop." "I want to read a novel because it's author is a winner of literary prizes, not because I can't put it down ..."
- xigoi 3y agoIf you want to convince someone to start doing something, comparing it to cigarettes is probably the worst possible idea.