4 ms·
I think you could say the same thing about any language where there are big frameworks and libraries that handle a lot for you. In the Java world, a Java EE CR
by Mister_Snuggles 12y ago
I think you could say the same thing about any language where there are big frameworks and libraries that handle a lot for you.
In the Java world, a Java EE CRUD application is a LOT different than a Swing application that does the same thing. Likewise, a Python Django application is a completely different beast than a console application.
- danieldk 12y agoBut there is less variation: Java provides only one paradigm (OO) and frameworks use different flavors of that: beans, POJOs, heavy classes, etc. In C++ you can have such variations, plus all the other paradigms, including: * C with classes (people programming in this style often still use C strings, do deletes and frees in destructors). * C++ as the full-blown OOP language, with extensive multiple inheritance hierarchies. * Nearly functional, STL-driven C++. In this code you see nearly no loops at all, <algorithm> is the control structure. * Template-driven programming, with policy classes, dozens of specializations, only header files. Etc. Java does not have the legacy to 'embed' another language. Java does not do multiple inheritance, avoiding heavy-inheritance-based projects, Java does not claim to be a semi-functional language (though Java 8 brings Java closer in that direction), and Java does not provide a turing-complete template language that is a world on its own.
- 72deluxe 12y agoThat's a pity. My code appears to be a mix of the first three..... any recommended reading?
- Vaskivo 12y agoThat's the problem I have with C++. It is a mish-mash of paradigms, features and techniques. It is not consistent in use-cases and philosophy (unless you count "all and everything" as use cases and philosophy). As much as I try to find "my" general purpose language of choice, and forr all of my inertia in learning yet another programming language, I believe languages should have narrower scopes. And there should be more languages. Specialized for specific use-cases. And, as a pythonista, the "you can do/use it in many different ways" just irks me.
- lmm 12y agoI thought much like that (and was a huge Python fan) until I found Scala. There are cases people cite as "more than one way to do it", but they're usually superficial syntax differences. You do have to choose between passing around objects and passing around functions, but that's a choice you make in Python as well. It can handle high-performance calculation or high-level scripting, but it never feels like these are separate languages; it has a bunch of orthogonal features but any two of them combine in exactly the way you would expect (and often that combination forms something very useful).
- danieldk 12y agoScala is different than C++ in the sense that Scala at its core is a simple language compared to C++ and most abstractions are built from that. That said, there are different Scalas to, Scala the 'a better Java' is a very different language from scalaz/shapeless Scala. This seems to be the curse of any powerful core language (Scala, Haskell, ...) - on the one hand they allow you to make all kinds of useful abstractions that you can't make with e.g. Java. On the other hand, their abstractions are so powerful that they create seemingly different languages. One could apply the same rule as C++ - stick to a subset of the language/abstractions. However, if you look at e.g. Haskell, a large number of libraries now depend on a library such as lens [1], so often it's not that much of a choice.
- lmm 12y agoI think it's good that a library can become sort-of "standard" without having to be part of the language standard library (where, as the python folk say, modules go to die). We're starting to see this come together in Scala-land - if you want a Monad typeclass you use the Scalaz one, if you want a HList you use the Shapeless one, and if you want HTTP you build on top of the spray-http abstractions (I'm particularly pleased that Play intends to port to run on top of Spray). That's something that you don't really get in C++, with the possible exception of boost; there are still multiple ways to do threading, multiple ways to do event-driven, all with their own conventions.
- 12y ago