Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment "generics" (Score -1, Interesting) 602

While some people always propagate the use of generics/templates, I'm strictly set up against it.
While you get at first sight nice stuff like reusability etc. there are several reasons for avioding generics like an STD:
  • The type checking is much weaker thus introducing new potential holes for error to slip through.
  • You must make some assumptions about the used classes however verifying the correctness of these assumptions in nearly impossible.
  • The reusabilty "argument" is rubbish: that's what we have already OOP for. And when you now claim performance problems due to heavy stack/virtual methods use: that's an issue of the processor design not of the programming language. When you think that running serious software on system compatible to 30 year old rubbish is cool, then you must accept the performance of 30 year old waste in the same turn.
  • The above mentioned problems create new security holes. That's why the use of generics/templates in strictly forbidden in e.g. the banking sector.
  • Due to turing completeness of most template/generics systems the compiler is slowed down to 30 percent performance. More evil is that templates push the grammars into the Chomsky-0 type making secure (=100%) correctness checking impossible.
  • In old languages like Lisps the use of generics is usually strongly discouraged to users unless they are ultra-gurus due to the bad experiences. It's not clear why this should be different for Java or C++.

Slashdot Top Deals

The wages of sin are unreported.