News for hackers. Stuff that matters.
Re:The hidden cost of C++ (2009) by jon6 on Tuesday September 18, 2012 @01:28PM (#4539384)
I don't necessarily disagree with this assessment but you can easily create functionality in C that requires looking at multiple source files to understand whats going on.

    x = foo(bar(), baz());
Now you have to look at the definitions for bar and baz to understand the cost of this line.

I guess this is the trade-off with using a high level language. Expressivity vs transparency.

Re:The hidden cost of C++ (2009) by mpyne on Tuesday September 18, 2012 @01:45PM (#4539478)
This page gives another "nice" demonstration of C (in actual usage, not an obfuscated code contest): http://oldhome.schmorp.de/marc/bournegol.html

What's especially nice is that TRUE is defined as -1 in that source, not 1, which could easily confuse someone who isn't intimately familiar with C's boolean operators and conditional expressions (since something like if((a < b) == TRUE) { ... } would actually be incorrect).

Even with that in mind, it would still be nice to have a "safer to use" systems language than C++ generally available. Perhaps Go or D can fill that role (though good luck making that happen for game development on Windows...)

Re:The hidden cost of C++ (2009) by pjmlp on Tuesday September 18, 2012 @02:03PM (#4539562)
For many years that language for me was Turbo Pascal, but then it faded away. :(