Hacker News new | past | comments | ask | show | jobs | submit login

Paul Graham says:

> We can get rid of (or make optional) a lot of parentheses by making indentation significant. That's how programmers read code anyway: when indentation says one thing and delimiters say another, we go by the indentation. Treating indentation as significant would eliminate this common source of bugs as well as making programs shorter.

http://www.paulgraham.com/popular.html




By requiring parenthesis, indentation becomes so much simpler, the programmer doesn't even have to do it. It's done automagically.


It's done automagically for me in Python and Haskell, too. Instead of hitting the paren keys in Emacs, I just hit tab to cycle through the possibilities.

Because the Lisps have such a canonical way to indent them, in practise it feels very similar to significant whitespace with a funny input method.


"automagically", "I just hit tab"

You and Understanding are not exactly on speaking terms, are you?


Normally, hitting tab just insert another \t wherever your cursor happens to be. Hitting tab in haskell-mode or python-mode just cycles through the two or three (or sometimes one) possibility for indentation for the current line. That's automagically enough for me.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: