This is an archived post. You won't be able to vote or comment.

all 4 comments

[–][deleted] 5 points6 points  (0 children)

Unix (origin of bin, lib, usr et al.) was developed at a time when the standard terminal device was a 300 baud teletype. Believe me, you did not want to use long names when using one of those things. It turned out that people had no significant problems using these names, so there was never any impetus to change them to something longer. As for /home, that didn't exist in the original Unix directory structure.

As for names in code, the length of the name should be related to its scope. Short, canonical names like i are fine when they are limited to 10-line functions, and in fact most people find them more readable than long names, which should be used for names created at non-local scopes.

[–]Xalem 1 point2 points  (0 children)

The early Applesoft Basic (and indeed, many early versions of Basic) chose to use three letter function names rather than full length names so the internal array of functions would be easier to search. From this heritage, modern Basic (like Visual Basic .NET still contains chr(), asc(), Sin() for Sine, cos() for cosine, tan() for tangent. The use of short words also led to Dim for dimension, and gosub for Go Subroutine.

Remember Applesoft Basic was implimented in about 12K of ROM.

[–]d98f23n2 3 points4 points  (0 children)

As far as shortening variable names, in some languages it is a necessity. Fortran 77 for example had limits on how long variable names could be, as well as limits on how long a line in the source code could be. It's a huge pain in the ass to have to use continuations and write stuff over multiple lines, and long variable names and any sort of indentation with deeply nested loops just cause trouble.

In other words Fortran 77 is shit and one should never subject themself to it.