It's quite funny to read about Templates and Exceptions in C++, after having used them extensively in Java and never in C++ (well, call the first ones generics).
They were so advanced, for the time, but in the case of exceptions, a bit limited: in C++ you can just catch integers, while in Java you catch objects of type Exception.
I've heard people saying that C++ templates are far more powerful than Java generics. I don't know exactly why but the fact is that Java generics are a mess so people stay away from them, or use them as little as they can.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.