this post was submitted on 05 Sep 2023
403 points (94.7% liked)

Programmer Humor

18292 readers
2346 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 

"It's just easier to type" and other lies you believe

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 31 points 10 months ago (16 children)

Seriously though, why? Is there historic reasons for that? Did they have to pay extra for more letters back in the day?

[–] scurry 35 points 10 months ago (9 children)

Yes. Memory and storage were at a very high premium until the 1990s, and when C was first being developed, it wasn’t uncommon for computers to output to printers (that’s why print() and co are named what they are), so every character was at a premium. In the latter case, you were literally paying in ink and paper by the character. These contributed to this convention that we’re still stuck with today in C.

[–] [email protected] 11 points 10 months ago (2 children)

IIRC older DOS versions were also limited to 8.3 filenames, so even filenames had a max limit of 8 characters + 3 extension. May it was a limitation of the file system, can’t quite remember.

[–] scurry 9 points 10 months ago (1 children)

At one point it was both. At one point they internally added support for longer file names in DOS, and then a later version of the filesystem also started supporting it. I think that on DOS and Windows (iirc even today), they never actually solved it, and paths on Windows and NTFS can only be 256 characters long in total or something (I don’t remember what the exact limit was/is).

[–] [email protected] 6 points 10 months ago

It's 256, unless you enable something in the registry. NTFS supports paths longer than 256, funnily enough.

load more comments (6 replies)
load more comments (12 replies)