Email or username:

Password:

Forgot your password?
Sos Sosowski

Some of my favourite bits from MS-DOS 4.0 sources in C:

1. Cursed Pascal
2. Witty boolean
3. Variable hell
4. Very clean and readable function names

24 comments
Alfred R. Baudisch

@sos love long, descriptive function names.

I am one who write very long names and with that I can come back to the code 10 years later and still understand it at first glance.

As a matter of fact, I was dealing with two such cases at work at this very second (Elixir code):

Ark 🏳️‍⚧️

@alfredbaudisch @sos elixir must be designed to make you do this. this one constantly writes really long variable names

Alfred R. Baudisch

@ark_lamp_umbrella @sos It's unrelated to the language, it's personal preference. General Elixir code bases are not like that, they are actually very concise.

I do that in all languages, last year I did a lot of C# and also have VERY long function names. Likewise with GDScript (Godot). Two open-source examples from me: github.com/alfredbaudisch/Godo and github.com/alfredbaudisch/Godo (well, even the repository name is long in this case).

Or like sos's MS DOS example, that's in C.

@ark_lamp_umbrella @sos It's unrelated to the language, it's personal preference. General Elixir code bases are not like that, they are actually very concise.

I do that in all languages, last year I did a lot of C# and also have VERY long function names. Likewise with GDScript (Godot). Two open-source examples from me: github.com/alfredbaudisch/Godo and github.com/alfredbaudisch/Godo

Wolf480pl

@sos lol looks like the last one is passing return values through global variables, as if it's a shell script, not a C program

Sos Sosowski

@wolf480pl @sos a lot of them are passing values via registers exposed as structs too

Yaksh Bariya

@sos wait really, lol. So the meme is atleast somewhat true :)

Felix Urbasik

@sos Someone really didn't like C, huh?

Emil Oppeln-Bronikowski

@sos did they used BEGIN and END in every block, or just functions?

while(1) 
 BEGIN
  derp();
 END

etc?

Konrad Kołakowski

@sos I've heard that in early C compilers, variables had some length limitation in case of names 🤔 Also it could be some programmer habit left from earlier languages like BASIC 😉

Sos Sosowski

@kkolakowski @sos They were shit slow and would go much faster if you kept to shorter names back then for sure.

Johan Sköld

@kkolakowski @sos Reminded me of early PHP that used the length as the hash function for the global function table, so they picked function names based on how long they were to reduce collisions.

Per Larsson

@sos 4. Globals instead of return values. 😬

Sos Sosowski

@finalman @sos this will generate least instruction compared to passing multiple pointers back and forth. This thing had to work on an 4.77 MHz XT

André-LA 🎀 gamedev

@sos The TRUE and FALSE ones it's gold.

(Also a fantasque fan btw 😎).

Fuchsiii~~~

@sos @puniko oh well everyone knew that DOS was kind of a beautiful mess so I’m not surprised…

DeepBlue V7.X

@sos@mastodon.gamedev.place Am I correct to assume, that those clean, readable function names rely a lot on global variables?

shironeko
@sos lmao, do those function set a global value?
Go Up