3 ms·
> I'm not clear on how subroutines or subprograms became known uniformly as "functions". The C "void function" concept clearly contradicts what a "function" us
by kubanczyk 3y ago
> I'm not clear on how subroutines or subprograms became known uniformly as "functions".
The C "void function" concept clearly contradicts what a "function" used to mean. I suspect the trend might have started somewhere around BCPL (before 1967), which was predecessor of B, which was predecessor of C. Its manual said:
> The semantics of a routine definition is exactly as for a function definition except that the body of a routine is a block and therefore its application yields no result.
https://www.bell-labs.com/usr/dmr/www/bcpl.pdf https://www.bell-labs.com/usr/dmr/www/bcpl.pdf
- rzzzt 3y agoIn these cases the programmer is more interested in the side effect than the actual result -- in fact there may not even be a meaningful one. "print" could return the input string, for example, but what difference does it make if no one is looking at it?