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

Programmer Humor

19310 readers
1734 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

top 27 comments
sorted by: hot top controversial new old
[–] [email protected] 68 points 1 year ago (3 children)
[–] H2207 12 points 1 year ago

x86 backwards compatibility

[–] [email protected] 9 points 1 year ago (1 children)
[–] H2207 3 points 1 year ago

Just the 1 premium linux distro please..

[–] Cyberflunk 6 points 1 year ago

Commodore 64 effective

[–] [email protected] 39 points 1 year ago (1 children)
[–] [email protected] 8 points 1 year ago* (last edited 1 year ago) (1 children)
[–] FooBarrington 5 points 1 year ago (1 children)

__builtin_PRAGMA_glibc____WIN32___astrnfgets0_musl()

[–] [email protected] 3 points 1 year ago
[–] [email protected] 31 points 1 year ago (4 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 1 year ago (3 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 1 year ago (1 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 1 year 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 1 year ago

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

[–] [email protected] 5 points 1 year ago (1 children)

Thanks for the insight! I think this kind of convention that once made some sense, is now exclusively harmful, but is still followed meticulously, is often called "tradition" and is one of the high speed engines that let humanity drive towards extinction.

[–] scurry 5 points 1 year ago (1 children)

I agree, and these conventions are being followed less over time. Since the 1990s, Windows world, Objective-C, and C++ have been migrating away (to mixed results), and even most embedded projects have been too. The main problem is that the standard library is already like that, and one of C’s biggest selling point is that you can still use source written >40 years ago, and interact with that. So just changing that, at that point just use Go or something. I also want to say, shoutout to GNU for being just so obstinate about changing nothing except for what they make evil about style. Gotta be one of my top 5 β€˜why can’t you just be good leaders, GNU?’ moments.

[–] [email protected] 6 points 1 year ago

at that point just use Go or something

*Rust (obviously!)

[–] [email protected] 4 points 1 year ago (1 children)

Wait, but they didn't print out the source code right? Or did they use teletypes to develop?

[–] [email protected] 10 points 1 year ago (1 children)

or did they use teletypes to develop

Basically yeah. ed the editor was designed with that in mind

[–] [email protected] 4 points 1 year ago

Oh, that makes a lot of sense then.

After all, it is the standard text editor

spoiler

uff, doesn't feel right if it isn't KasaneTeto saying this :/

[–] [email protected] 22 points 1 year ago* (last edited 1 year ago) (1 children)

I worked with a complier that would assume only compare the first 8 characters and would treat it the same afterwards.

Compiler copyright was around 1990.

Edit: This was for function names in C

[–] [email protected] 6 points 1 year ago

Damn that must have been such a headache

[–] [email protected] 13 points 1 year ago* (last edited 1 year ago) (1 children)

They did, with core you could be paying for many dollars per bit of memory. They also often used teletypes, where you would pay in ink and time for every character.

[–] [email protected] 2 points 1 year ago (1 children)

Unix didn't run on core though, did it? I thought core was before its time

[–] [email protected] 3 points 1 year ago

A early models of PDP-11, the computer Unix was developed on, did use core.

[–] AngryCommieKender 8 points 1 year ago

We were limited to a certain number of characters for filenames, way back in the Apple ]|[ days. IIRC it was 8

[–] [email protected] 18 points 1 year ago

I'm a world of compilers and tab completion, there is no excuse for those function names