|
Re: The Positive Legacy of C++ and Java
|
Posted: Apr 9, 2009 9:50 AM
|
|
> > Right, but I don't think your comparison is valid. > > It's an analogy more than a comparison. It's an attempt > to ...
I think good teams can only be teams made of people with comparable skills and knowledge, besides a common professional culture earned over a long time - whether they do programming or something else. If one person in a team is OK with operator overloading and uses it where appropriate, the others should at least be able to understand the concept, as long as they aren't a lot less skilled programmers.
Team members should of course not compete against each other. However, the team has no choice but to compete against other teams. If other teams, made of similarly skilled programmers as those in my team, use tools which allow them to deliver better code, maybe in just 10% of all cases, just due to operator overloading, they have a competitive advantage over my team.
Of course, it may be that operator overloading doesn't help at all in most of the code, but I don't like the idea of Sun or the JCP making the decision that it never helps for me or my team, especially since Sun has no way of knowing what code my team and I are working on, or will be working on in the future. If they do, they give me reason to give up Java in favor of some other language, also compiled for the JVM, but which doesn't make decisions for me wihtout knowing what I am working on or what I will be working on.
What I don't like about languages is cryptic syntax - C++ excels at this.
In general, I like languages to provide me with any language feature somebody could come up with, provided it doesn't excessively complicate the syntax, or it doesn't use a cryptic syntax itself. Generics, which I think are a good thing, except for for the stupid implementation they got in Java, are far worse for the syntax than operator overloading, not just in Java but in C++ too. As long as you think of operators in general as just another method to a class, I can see no more obfuscation potential in them than properties in .Net or preprocessor macros in C++. Properties in .Net are very convenient and everybody loves them, while C++ cannot exist without the preprocessor. As for the syntax, in C++ you have nothing added or removed from the syntax with or withoug operator overloading.
|
|