3 ms·
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 mult
by Someone 11y ago
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 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.