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

I manage to misplace brackets and parenthesis in python. I fear what sort of trouble I could get myself into with a language with as many parentheses as lisp.

Readability is subjective.



I have to say that I often have more problem with indentation and the like in Python or YAML, especially given the insistence that indentation means a specific amount of specific whitespace character.

The lower level of S-expression serialization kind of resulted in offloading this task to editor, where it should lie, instead of burdening the developer with it. That said, even I will admit that without experiencing the fact that the editor will handle parens for you, one's experience in other languages is going to suggest bad things. How many of us ended up having to manually count "end" keywords in Pascal and the like?

Still, with a proper editor (not just emacs), the experience is really, really different.


To elaborate on what others have said (editors), Emacs' auto-indentation of lisp is _phenomenal_, even if you're not using "paredit". You basically can press tab on any line, and it will be indented to the Right Place. It quickly gets relatively easy to correlate indentation depth to how many parens you need to close your s-expression.


I have encountered indentation problem in Python far way often than the problem with a misplaced paren in any Lisp. It is very rare and every editor/compiler/linter has ways to detect that and help you fix it.

Readability is indeed subjective. Few years ago I myself would strongly oppose my own words about Lisp being readable. Several years ago even plain English was pretty much unreadable for me. I guess it's a good thing I haven't dismissed it, otherwise we wouldn't be having this conversation :)


People generally use Emacs with ParEdit or parinfer to handle balancing parenthesis. Instead of working with the code at a textual level, you end up working with it at a structural one.


editors solved the problem of parens way back in 80s.




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

Search: