Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Anti-C++ Hipsters

Name: Anonymous 2011-04-02 0:26

People who hate C++ are only doing so because it's hip and cool to hate on something that seems too complex at first glance. You want to be seen as cool and edgy, as someone who goes against the grain, when in reality you're just another annoying undergraduate that will probably have a hard time finding a job in the field.

C++ is not perfect, but no language is. Get over it.

Name: Anonymous 2011-07-03 10:41

>>81
if i'm understanding that correctly, the "abc" constant is passed to the constructor to string, which creates a new string object, and then the string object is passed to f(). that variable is passed by reference but then thrown away after the call completes. so the rval is automatically cast to an lval which then goes into the function.

>>76
yes of course rvalues can be variables but i guess i was confusing your point, i thought you were talking about the difference between literals and variables. a variable, when used as an rval, is for all intents an purposes the same as a literal.

and yes, C and Java generally do not allow the type of a variable to be changed after compilation. that's the way it should be for maintainable code. otherwise static analyses, such as finding all the references for a given variable, don't work. if you can change and repurpose variables willy nilly that pretty much throws the advantages of type safety out the window.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List