billroper: (Default)
billroper ([personal profile] billroper) wrote2004-08-23 03:31 pm
Entry tags:

Thud, thud, thud...

Pure virtual functions in template classes: necessary evil or tool of the devil?

[identity profile] shsilver.livejournal.com 2004-08-23 08:32 pm (UTC)(link)
I'm not sure that is a binary choice. There is always the option of Both of the Above.

[identity profile] tnatj.livejournal.com 2004-08-23 08:38 pm (UTC)(link)
Well, if the template class is named "Devil" ...

(Draw your own conclusion.)

You gotta be kidding...

[identity profile] scs-11.livejournal.com 2004-08-24 02:28 am (UTC)(link)
Tool of the devil, of course.

Mind you, I think C++ as a whole went over the line long ago and became a kind of reducto ad absurdum on OOP. Much better to choose the relative sanity of Objective C or Python. But it's not like you have any choice about it at this point, tho. You're in bed with him, better hope his not the Devil.

[identity profile] tigertoy.livejournal.com 2004-08-24 05:07 am (UTC)(link)
I could be convinced that templates in general were a bad idea for C++, but if they're going to exist at all, they should work in all their permutations. Including allowing pure virtual functions in template classes. It might be pretty difficult to come up with an example where using them is actually the best solution, but when that situation comes along, I don't want to discover that the compiler doesn't support it, and I *certainly* don't want to discover that the compiler doesn't support it because the compiler writer decided it was "evil".