3 ms·
I’ve worked through chapter one of SICP, and whereas I can admire the purity and kind of ‘belly feel’ how good Lisp can be it’s really painful translating expre
by implements 3y ago
I’ve worked through chapter one of SICP, and whereas I can admire the purity and kind of ‘belly feel’ how good Lisp can be it’s really painful translating expressions into pre-fix and having to do all the iteration using recursion.
- easeout 3y agoYou do get used to the syntax, at which point returning to languages that are prefix here, infix there, statements one way, expressions another, can wrinkle your nose a bit. But syntactic patterns are a question of emphasis; they establish a grain to go with. Lisp's syntax is so uniform as to have no grain. That puts more responsibility on you in exchange for high level flexibility—you can do things the way you want, and a creative method won't be against the grain like it might be in another language. As for the recursion part, that's more true of Scheme, and it serves SICP's purpose of explaining that iterative and recursive processes can each be generated by recursive code. Common Lisp and friends do have iterative options for loops. But you will probably work in aggregate list operators more than touching a loop yourself.
- erichocean 3y agoFWIW, that's 100% true and virtually everyone experiences it. It completely goes away, so much so that it's almost impossible to remember emotionally how difficult it once was. I can promise you won't struggle with it for more than a few weeks (at most) of daily use. Source: someone who switched to Clojure recently, is loving it, and finds the syntax/iteration no longer on the list of things I even think or worry about.