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

Strange to me. The "modern" style (roughly mid 80s) is super clear to me, with the indentation doing a lot of work and the symbol names so clear (I still find the MixedCase jarring and significantly slower to parse, while using-dashes or even using_underscores much easier).

This style also encourages blocks to be compact so they almost fit right into your fovea. The spread-out "C" style that emphasizes the curly braces on their own line seems so backwards, emphasizing precisely the thing you don't care about.



> The spread-out "C" style that emphasizes the curly braces on their own line seems so backwards, emphasizing precisely the thing you don't care about.

Really? I like the curly braces on their own line precisely because that's what I do care about. I want to see the block structure - the context, if you will - before I think about the individual lines.


I think you are right. We should strive to keep the syntactic structure of the program separate from the actual symbols used in that structure. Then you can understand the structure separately from its "content".

The symbols are meaningless by themselves, except that the same symbol can be used in multiple places. BUT the syntactic structure of a program is NOT meaningless. It in fact defines the "meaning" of the program - in as far as the symbols used are arbitrary.

Therefore if you can express the program structure separately from the symbols, you make the program easier to comprehend.


That’s what indentation is for. Parsed at a different level by your brain.


I've seen too much over the years. I've seen indentations be a lie. I've seen indentations get mangled because someone's editor is set to use tabs instead of spaces, or vice versa. I can only halfway trust the indentation, but the curlies don't lie.


That would be like Python where the indentation defines the syntax of your program., right?

But the jury is still out whether using indentations instead of syntactic markers is a good choice for a programming language.


Yes, though the parens are important. In fact grinders (code formatters) are quite commonly used in Lisp, so the indentation is just instruction to the programmer; it has no semantic value to the interpreter or compiler.




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

Search: