An outrageous, insightful, and sadly accurate commentary on programming. I found this an extremely entertaining read and agree with most of it. It doesn't offer solutions, but certainly highlights a lot of the problems.
"Double you tee eff?" you say, and start hunting for the problem. You discover that one day, some idiot decided that since another idiot decided that 1/0 should equal infinity, they could just use that as a shorthand for "Infinity" when simplifying their code. Then a non-idiot rightly decided that this was idiotic, which is what the original idiot should have decided, but since he didn't, the non-idiot decided to be a dick and make this a failing error in his new compiler. Then he decided he wasn't going to tell anyone that this was an error, because he's a dick, and now all your snowflakes are urine and you can't even find the cat.
Personally, I think things will only get better (including salaries) when software development is treated like other engineering disciplines.
(Score: 2) by maxwell demon on Thursday May 01 2014, @10:41PM
I honestly cannot understand the issues that most people seem to have with the STL. For me it's one of the best libraries. Sure it's not perfect, but it's quite close to it.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 1) by SplawnDarts on Thursday May 01 2014, @10:54PM
Because it generates code like (taken from an example - maybe not optimally readable): // Dump the list to check the result
for (list::const_iterator citer = mylist.begin();
citer != mylist.end(); ++citer)
{
cout (*citer).m_iData endl;
}
Instead of (python):
for item in list:
print(item)
(Score: 1) by SplawnDarts on Thursday May 01 2014, @11:01PM
OK, HTML formatting mangled that (my bad for not checking)
vs (python)
(Score: 2) by maxwell demon on Friday May 02 2014, @06:17PM
In C++11, you can write
Not that much more complicated than your Python variant, is it? But note that (both in C++11 and in Python) this sort of loop needs specific language support, while the STL was written are pure library for C++ (and only afterward integrated into the C++ standard library). You cannot add new for loop syntax using a library.
Anyway, your examples are not equivalent: The equivalent code in C++89 to your Python code would be cout . I wonder if you intentionally made the C++ code do something more complex to increase the perceived complexity of C++ (also your use of (*citer).m_iData instead of the equivalent but simpler citer->m_iData hints in that direction).
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by maxwell demon on Friday May 02 2014, @06:19PM
Damn, should have been preview instead of submit ...
Of course the corresponding C++89 line would be
The Tao of math: The numbers you can count are not the real numbers.