News for hackers. Stuff that matters.
Re:When ‘int’ is the new ‘short’ by Someone on Wednesday July 08, 2015 @06:42AM (#9850814)
For return values of a function it allows overloading, with negative numbers indicating errors.

That's useful if your language lacks the ability to return multiple values from a function. That typically was (probably still is on quite a few architectures) the case for languages designed for speed.

Also, in C, int was implicit (see https://github.com/mortdeus/legacy-cc for example source code). So, using int made your programs shorter. That's important if your multi-user system doesn't have much memory (the first PDP-11 that ran Unix had 24 kilobytes of memory), and if you like concise porgrams, as Ritchie apparently did.

There are no comments on this comment yet.