"White space is as important to code as silence is to music. Without them music is noise and code is an impenetrable wall of text." -Nils M Holm
Probably true for Lisp, but gofmt would disagree.
Ask HN: Why is the source folder called 'src'?
11–16 of 16 posts
Re: Ask HN: Why is the source folder called 'src'?
#12I feel like long names were popularized with Java and books like Clean Code (2008). Today you see names like "destinationAccountForTransfer". 10 years back it was common to see "destTransfer". 15 or so years ago you might see "szDest" instead.
Re: Ask HN: Why is the source folder called 'src'?
#13"White space is as important to code as silence is to music. Without them music is noise and code is an impenetrable wall of text." -Nils M Holm
That's white space. Difference between source and src is more like a 1/8 note vs 1/4.
Re: Ask HN: Why is the source folder called 'src'?
#14I feel like long names were popularized with Java and books like Clean Code (2008). Today you see names like "destinationAccountForTransfer". 10 years back it was common to see "destTransfer". 15 or so years ago you might see "szDest" instead.
The general "clean coding" rule is longer names for global and/or big namespaces and shorter names for localized, smaller ones. For example, a local variable that's defined in the current function or block can have a very short name, whereas for a module-wide function you'd pick something longer and clearer. Even more so for something that's globally accessible to the whole program, or exported as an API.
Re: Ask HN: Why is the source folder called 'src'?
#15Earlier quoted context omitted.
Probably true for Lisp, but gofmt would disagree.
Writing a formatter for lisp would be a piece of cake, as the syntax is very simple
I meant to refer to how gofmt doesn't destroy information (to a human reader) whereas a Lisp formatter would probably make well-formatted comprehensible source much less so: conceptual chunks can't be inferred from syntactic ones--well maybe with GPT-3.
Re: Ask HN: Why is the source folder called 'src'?
#16You can type `src` easily with one hand, `source` requires two.
Not _the_ reason, but a reason for not changing.
Minor sarcasm above.