Log in

No account? Create an account

C++ as an Intelligence Test

A while ago a friend mentioned he was learning C++. I told him he'd hate it. He said that so far it was being OK. Earlier this week, he commented on some annoying syntax features and said he thought he was beginning to see what I meant. I laughed to myself.

Tonight he complained that when he put a reference to foo on his list, the destructor got called when the list went out of scope. "That's a list <foo> you've got there not a list <foo &>," I said. "Now imagine if you actually had a list of references and think about how the objects would eventually get deleted." He had gone through the necessary realization and reached a state of "abject terror" within minutes. That, my friends, is how you use c++ as an intelligence test: how fast does it take someone to realize exactly how much rope they have.


ive been coding c++ for 7 days and already had copy constructor, pass-by-ref, and fucked up template problems.
if i had a choice id be doing this in java, but wxwidgets is c++ only


There's a python wrapper for wx, though. :-)
im -porting- the code from python
i know you wouldnt believe it, but python is too goddamn slow :P
Does this mean that you've changed your attitudes? Last time we had a language discussion, years ago, you were adamant about C++ being the only true language (well, besides Perl) specifically because of all that rope. :-)
No. But if you're going to use something with that much rope, you
damn well better know that you have it and pay attention to where the loops are draped.
Discussions of C++ just make me feel old. I'm still happily using C, but I keep thinking that maybe I ought to try to learn one of them new-fangled object orientated languages.
I decided C++ had too much syntactic sugar when I discovered you had to look at the function prototype, not the call, to determine if an argument could be modified or not. I don't use it a lot, but since a repeating feature of my career has debugging/completing projects that were too hairy for their original designers/developers, I dread encountering something begun by someone with a taste for the cute and esoteric.

September 2019

Powered by LiveJournal.com