[c++] can't explicitly define default copy on class containing array & virtual func

Started by
23 comments, last by Sneftel 14 years, 2 months ago
Quote:Please write N prefixes on your nouns. It tells me they're nouns (words that are ordinarily nouns can sometimes be used as adjectives or verbs), reduces name collisions, and is easier for me to read.


Please write "s" suffixes on your plurals. It tells me they're plurals (as sometimes the context doesn't imply this), it's easier for me to read.

I'm sorry, but English has modifiers like these all over the place. They aid comprehension.
"I am eat my bag of grape." is understandable, but modifiers make it easier to read. Like C++. there are places where the lack of these modifiers may prevent full comprehension in sections of text.



I have no issue with you not using prefixes. Yet I and many others find prefixes make code easier to read. You may not, but don't assume that everyone else is like you. Brains aren't all built the same.

The authors of C and C++ deliberately did not add style requirements. The C++ standards committee has not expressed any intention to add them.



BTW Zahlman, did you mod me down for disagreeing with you?
Advertisement
Why would I want a virtual assignment operator anyway?
Quote:Original post by yacwroy
I have no issue with you not using prefixes. Yet I and many others find prefixes make code easier to read. You may not, but don't assume that everyone else is like you. Brains aren't all built the same.


My belief is that people who say they find this sort of thing "easier to read" have simply convinced themselves of something that isn't actually true, and would disabuse themselves of the notion quickly if they'd simply try not using the prefixes.

Quote:BTW Zahlman, did you mod me down for disagreeing with you?


Of course not.

Quote:Please write "s" suffixes on your plurals. It tells me they're plurals (as sometimes the context doesn't imply this), it's easier for me to read.


Sure thing. The difference is that those are an actual part of the language, not convention. I have no problem with "ID customerID" (although it's unfortunate to repeat the type information, this is more the fault of manifest typing in the first place; calling the variable "customer" would be wrong in that it doesn't actually describe the variable contents, because it implies a different type) or "std::vector<Foo> foos". When your variable names are 'idCustomer' (or worse, 'iCustomer') and 'cFoo' (or worse, 'vFoo'), then the problem starts, because we are (a) writing identifier names in a deliberately artificial way, simply in order to (b) repeat information that is already required and checked by the compiler, in a non-compiler-checkable form, and not (however much it might appear that way) to describe the variable's contents better.

To be clear: this isn't some kind of silly distinction between prefixes and suffixes; it's about clarity, aesthetics, and intent.

Quote:Original post by DragonMasterHawk
Aw, you ninja'd in an edit after I posted.


I don't know what you're talking about.

Quote:And how are you any different?


I can't figure out what you're trying to say here, either. I was explaining how your objection to the notion "You have a superficial idea of cleanliness, mostly at the level of conformance to coding conventions" is bogus. The idea of cleanliness expressed with these extra markings certainly is superficial. Just because something can be understood "on the same pass" doesn't mean it isn't a needless distraction.

Quote:Honestly, I didn't really expect this kind of tantrum from a mod.


Tantrum? Um, sure, whatever.
Quote:Original post by Zahlman
... 'it' and 'me' are pronouns, and 'more' is an adjective (describing 'elements of C++ syntax' or something of that sort).

...just going to show we have no problem understanding what you mean even if we have no idea if something is a noun or not [lol]

Quote:Original post by DragonMasterHawk
Honestly, I didn't really expect this kind of tantrum from a mod.

You have an interesting definition of tantrum. Granted, I play dwarf fortress, so my definition of tantrum is a bit skewed -- tending to involve death destruction and a bridge or two getting destroyed. And that's on the mild end ;)
But he started it!

This topic is closed to new replies.

Advertisement