5 ms·
> Its next impossible to deal with any large Java project without an IDE True, but I don't see it as a problem (for me). > The verbosity of the code is mind b
by RivieraKid 13y ago
> Its next impossible to deal with any large Java project without an IDE
True, but I don't see it as a problem (for me).
> The verbosity of the code is mind boggling.
I don't find Java that verbose (especially with lambda functions in Java 8).
> method calls are 4 - 6 layers deep
I don't understand, do you mean nested method calls?
> 90% of that is machine generated through eclipse.
Definitely not 90% and lot of the generated code would have to be written manually in languages like Python.
> The only reason to use Java these days is ...
Libraries, tools, speed, multiplatformity. Also, Java is a pretty good language by itself. It lacks in many ways, but for a LOT of projects, it's a great choice. What language would you suggest as a Java alternative?
> super low cost devs
Java devs are among the most expensive.
- kamaal 13y agoI like working with Java too. I'm only pointing out the problems, which I see are pretty clear. The only problem is from the perspective of using and developing a new skill, I would rather use a newer language which is better built for problems of our time than something 20 years back. Java has had its day in the sun. Its primary purpose was to become an easy C++ for people who didn't get memory management and people who didn't want to get into tiny pedantic issues while trying to run their code on two different Unix'es. But these are by and large solved problems now. Over years a lot of legacy code has gathered around Java. But if you want better employability especially if you want to work on new projects, new paradigms and new domains of problems you should likely chose newer set of languages. Not Java. One hard lesson that I've learned over the years is to never have any hard religious feelings towards old aging tools. We must learn to move on, find new shores build new stuff there. The only projects you get with these older tools are legacy ones, and people are generally waiting just to phase them out.
- RivieraKid 13y agoOk, what language would you suggest as an alternative? I've written code in lots of different languages and I haven't found a replacement yet (C# is closest, but I mostly do Android development, on Linux).
- Shamanmuni 13y agoAs someone suggested earlier, Scala is probably the best option for a Java developer looking for an alternative. Runs in the JVM, is compatible with Java programs, mixes OOP and functional programming. It can be summarized as "Java meets Haskell". What I found liberating in Scala is a simple proposition: "use OOP when it makes sense, and functional programming when it makes sense". It's wonderful when you don't have to reason about everything using the OOP lenses and you get to choose, very empowering. Your criticism to Scala in the other comment seems to amount to "it's not Java", which is extremely weak as an argument. If you are looking for an exact duplicate of Java, then just use Java. Scala is more complex than Java, certainly, because it gives you more options and also because it has a way of rewarding those who master the language. And "ugliness" is a completely subjective matter, I find Java with all its boilerplate ugly and not Scala, for example.
- RivieraKid 13y ago> Your criticism to Scala in the other comment seems to amount to "it's not Java" It amounts to "Scala is too complex, ugly and slow to compile." Yammer moved from Scala to Java BTW: http://blog.joda.org/2011/11/real-life-scala-feedback-from-yammer.html http://blog.joda.org/2011/11/real-life-scala-feedback-from-y... My ideal language would be some mix of Kotlin, Ceylon, Dart and Julia.
- Shamanmuni 13y agoYou are just taking one data point and assuming it proves something other than Yammer had problems with Scala. Check this list of companies using Scala: http://www.scala-lang.org/old/node/1658.html http://www.scala-lang.org/old/node/1658.html Some examples: Twitter, LinkedIn, Foursquare. All of them pretty big and in the same space of Yammer; they seem quite happy and don't plan to move away from Scala. And here you can find a clarification from Yammer about that issue: http://eng.yammer.com/scala-at-yammer/ http://eng.yammer.com/scala-at-yammer/ TL;DR: They liked Scala but it has rough edges, every programming language has rough edges (yes, including Java). They found Scala was not the best option for some particular situations and Java was a better fit. End of story. That's fine and completely reasonable, I think nobody said Scala is the Holy Grail in programming languages. As for your preference, you seem to be looking for a "nicer than Java, but OOP all the way" (don't know about Julia, haven't used it), which is OK as a preference but many of us find it a kludge to work with. I found something like Scala (multi-paradigm, I mean) helps me a lot in reasoning about code. As I said, you use the paradigm that makes more sense. For complexity and ugliness, you have my previous answer. About compile time, you have a sophisticated type system and type inference which come at a cost, but it's not such a big deal when you run it with fsc (which stands for fast scala compiler).
- ghostdiver 13y agoEach newer language has one common denominator - lack of proper IDE. Even though they come with some synctactic sugar, your productivity gets nailed by lack of good IDE. Java syntax has many problems, but they are very easy to overcome thanks to IDE and many JVM tools.
- pkolaczk 13y agoScala tooling is quite ok now, particularly the IntelliJ IDEA plugin. Still not the level of Java, but certainly way above anything for (much older) dynamic languages.
- eropple 13y ago> I don't find Java that verbose (especially with lambda functions in Java 8). Honestly: use something better for a while and come back and say that. Java is verbose. There is a ton of ceremony around anything in it, from ill-considered defaults that require lots of specification (see Scala's remarkable ability to strip bullshit out of its equivalent to Java code) to the cultural design-pattern mess. It's a lowest-common-denominator programming language, and it shows because it takes such pains to spell everything out every time. JDK8 lambdas sort-of help, but the language is still fat. > I don't understand, do you mean nested method calls? I think that's pretty straightforward and that these two go together.. You basically have to use an IDE (and while I am comfortable in an IDE this is a negative in the general case due to the complexity it implies) because you need go-to-definition all the time due to what is, frankly, class and method bloat. This method hands off to this manager class method which hands off to this class that exists just as a temporary stateful container and all of them add more boilerplate and force you to maintain more mental state and blurgh. I was guilty of it as a younger programmer, but I've aggressively tried to move away from that; some people don't seem to ever grow out of it. > What language would you suggest as a Java alternative? Scala. I'm a former Java web dev, current Android developer, and if I could shoot all my Java code between the eyes and replace it tomorrow with Scala I'd be a happy man. It's a language that aggressively attacks the idea of design patterns by making the language more expressive (whereas Java just codifies them). My new projects are exclusively Scala, and I'm turning out better, more readable code in shorter time. The JVM is fine, but Java-the-language and Java-the-culture are toxic as hell. And while it's no doubt harder to hire Scala programmers, the floor on quality is going to be a lot higher than Java programmers when I need to hire them.
- RivieraKid 13y ago> Honestly: use something better for a while and come back and say that. I've written code in about 20 different languages. What language features / lack of features do you think make Java verbose? I found Scala complex and ugly (and I'm not alone), much slower to compile than Java and Java has better tooling.
- eropple 13y ago