From: Charles D Hixson Date: 2006-11-21T09:23:53+09:00 Subject: Re: Ruby vs Java vs c++ David Vallner wrote: > Chilkat Software wrote: > >> - multiple inheritance >> > > C++ mixins anyone? Multiple inheritance with data is evil, but as long > as you only implement pure interfaces or mixins with it, it's > acceptable. It's not like a language should restrict its users with > regards to how horribly they can break the code (and brains) of other > people reusing their creations, eh? > > When multiple inheritance is done properly, it's not terrible at all. I point you to Eiffel circa 1995. They had problems, but it WASN'T multiple inheritance. That was one of their strong points. (Not claiming that C++'s multiple inheritance is good. I don't know it, and nobody seems to have anything good to say about it.) Also consider Python's multiple inheritance. No problems there!! >> - operator overloading >> > > Except for contexts where the -semantics- of the operator isn't being > overloaded, just implemented for a case the language doesn't natively > supported. Matrix multiplication -is- multiplication and a fine use > case, using, oh, shall we say, << for something that's not a bitshift, > like pushing data into an array or a stream (which some C++ texts > ironically discourage) is indeed bad. > > *runs for the hills - FAST* > > > David Vallner > Meditating upon Pots and Kettles Operator redefinition can be seriously abused. It's also something that's very powerful when done correctly. I can see an argument for requiring that the *standard* operators not be redefined. This doesn't mean that there shouldn't be user defined operators that CAN be treated just as any other (virtual) function. Perhaps a requirement like "A user operator must begin with a '|' character and contain no whitespace in it's name. It may contain any other non-control character, and must be delimited by whitespace." would suffice.