Linked by Bjorn Raupach on Thu 17th Jul 2008 06:01 UTC
Thread beginning with comment 323500
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[6]: Never programmed in Java before...
by Vanders on Thu 17th Jul 2008 23:11
in reply to "RE[5]: Never programmed in Java before..."
Er, not really. const is a standard feature in C++ for declaring, well, constants. Same as it is in C, and it's been that way forever. It's hardly a hack: certainly no more than inventing silly ways to return multiple values from a function.
Also, who said anything about pointers here? C++ supports proper bona fide pass by reference.
RE[7]: Never programmed in Java before...
by renox on Fri 18th Jul 2008 14:58
in reply to "RE[6]: Never programmed in Java before..."
Er, not really. const is a standard feature in C++ for declaring, well, constants.
Except that const are not always constants in C++.
It's hardly a hack: certainly no more than inventing silly ways to return multiple values from a function.
I find much more readable to have the input variable on one part of the function and the output variables on another part, of course readability isn't C++ strong point.







Member since:
2006-07-26
Cool... a hack around a hack ;-)