3 ms·
The "sin" I was referring to was calling undeclared functions -- which is how there are so few #include directives in much of this code. Most of the files I loo
by duskwuff 3y ago
The "sin" I was referring to was calling undeclared functions -- which is how there are so few #include directives in much of this code. Most of the files I looked at include <stdio.h> (probably required for variadic arguments on printf-type functions) and <file.h> (for the FILE type), and call other functions blindly.
- trealira 3y agoThat does make sense. My bad, I should have looked closer and noticed the implicitly defined functions. It's not even a good idea to do that on modern computers, because implicitly declared functions do type promotions from float to double and char/short to int, and on the System V ABI, it has to pass in the number of floating point arguments there are in register eax.
- jart 3y agoIt's not a good idea to do that in production code. FTFY. If you're writing research, experimental, or one-off programs then it can be a real productivity boon. I say do it for fun. You have a right to enjoy yourself and it'll still come out 10x more readable than Perl at the end of the day, let's be real.
- rezonant 3y ago> it'll still come out 10x more readable than Perl at the end of the day, let's be real. A low bar, really :-P
- queuebert 3y agoWait til you see old Fortran codes.