5 ms·
I think this may be another one of those swearing-in-church type opinions, but I think C++ is excellent as a compromise here. It's got its faults, but C++ allo
by mises 7y ago
I think this may be another one of those swearing-in-church type opinions, but I think C++ is excellent as a compromise here. It's got its faults, but C++ allows use of objects when necessary or helpful without the ridiculously pedantic OO of Java. It is quite nice to be able to use it when convenient while not having to do so when stupid.
- tyingq 7y agoIt's one of many languages where OO is optional.
- mises 7y agoThere are other reasons I like it: huge library support, ability to do low-level stuff for performance but use higher-level features for an easier time, etc. Mostly, I've yet to see something better that has the maturity, libraries, depth of talent (!), etc. that doesn't have problems of its own. It's certainly not perfect, but there are reasons it has remained so popular in many fields.
- musingsole 7y agoI'd extend the same argument to Python
- mises 7y agoI can't speak to python as much, as I haven't really used it, but I've heard a lot of good things about it (recently read a comment saying it was simply good at nothing but good enough at everything).
- QuackingJimbo 7y agoYou getting downvoted for this completely inoffensive (at worst) comment is pretty sad I swear C++ gets a bad rap because most people have only seen a gross mixture of C++98 and C in their codebases A fully modern C++11 codebase is a beautiful thing
- bhaak 7y agoWhy are you so sure the downvotes are not coming from the opinion of the "ridiculously pedantic OO of Java"?
- mises 7y agoMaybe because no body had commented as such until now? I am rather practical about this: I don't really like Java because it forces things that make more sense as functions to be under an object. What if I just want a simple global utility function, and don't want to make every single class inherit from a class containing only that? It's a lot of unnecessary hassle for something like that. I'm not saying OO is bad, I said it was too pedantic. I like languages which allow you to do what makes sense.
- pvg 7y agoand don't want to make every single class inherit from a class containing only that That's not how having a global utility function works in any OO language I can think of.
- mises 7y agoYou could also make a class of global functions and use that, but I think the point still stands: it forces square pegs into round holes, so to speak.
- fnrslvr 7y ago> You could also make a class of global functions and use that I'm not sure I understand your issue with doing this. You need to put your global (i.e. public static) functions in classes not because Java is forcing OO practices into everything, but because classes effectively serve as Java's translation units. I think they serve this purpose pretty well in practice.
- 7y ago
- smitty1e 7y ago> ridiculously pedantic OO of Java Are you trying to imply that whoever dies with the biggest exception stack trace does NOT win?