Slashdot Mirror


Ask Slashdot: Should I Move From Java To Scala?

"Scala is one of the JVM languages that manages to maintain a hip and professional vibe at the same time," writes long-time Slashdot reader Qbertino -- building up to a big question: One reason for this probably being that Scala was built by people who knew what they were doing. It has been around for a few years now in a mature form and I got curious about it a few years back. My question to the Slashdot community: Is getting into Scala worthwhile from a practical/industry standpoint or is it better to just stick with Java? Have you done larger, continuous multi-year, multi-man and mission-critical applications in Scala and what are your experiences?
The original submission asks two related questions. First, "Do you have to be a CS/math genius to make sense of Scala and use it correctly?" But more importantly, "Is Scala there to stay wherever it is deployed and used in real-world scenarios, or are there pitfalls and cracks showing up that would deter you from using Scala once again?" So share your experiences and answers in the comments. Would you recommend moving from Java to Scala?

147 of 245 comments (clear)

  1. Twitter and Scala by ebrandsberg · · Score: 5, Informative

    https://www.quora.com/Is-Twitter-getting-rid-of-Scala

    Quote "I can't answer that, but I did attend lately a session by Raffi Krikorian, who was VP Platform Engineering at Twitter and one of the people responsible for introducing scala at Twitter.

    He was asked about scala, and said that if he would have to choose again today, he's not sure he would go with scala.

    The argument was that scala introduces a big learning curve for new developers. Because of its complicated language features it can become hard to read. So at Twitter they are trying to not overuse the complexities of the language, so the main benefit they get from it are lambdas. Which is now basically available with Java 8. So the overhead of developer training might not be worth the benefit."

    1. Re: Twitter and Scala by 1+a+bee · · Score: 3, Insightful

      Agree. Coded in Scala. A large language -- makes C++ look tame, by comparison. Which in turn makes many 3rd party libs harder to read. Java 8 (look at Streams) offers many similar features in a smaller language that's easier to communicate. Learn Scala? Of course. But don't dive into its depths. We must all budget our time.

    2. Re:Twitter and Scala by audi100quattro · · Score: 2

      This isn't necessarily an argument against Scala, using it well will have it's challenges, but this is true for most languages. Linkedin went through the same.
      Some of the tradeoff's Twitter has had to make have changed. They moved away from Ruby, and for Ruby developers, Scala might actually have been easier to pickup than someone who has been doing Java since 1.4. You have to unlearn more OO practices to use Scala well, but you can write very rubyish or pythonic code in Scala. If I look at a project like finagle now from twitter (compared with gRPC from google), I can sort of see Krikorian's point, but finagle is still one of the best or the best RPC libraries out there if you know Scala. As far as language features, pattern matching, expressive types with inference, var/val immutability are all huge helps to write more concise programs. There are more CS-y features like tail recursion, laziness, um.. monads (any typelevel library), which can hurt or help the complexities in your program. As the Scala community has matured, developers and the language has gotten better at using/refining these features (specializations come to mind) and a few of the good and safe features have become more widespread (swift, rust, jave 8 lambdas)

      The learning curve is steep for an OO developer to use the language well, but I like what this article says about the challenges:
      https://www.infoq.com/articles...
      "As explained in this article all these features are already available in Scala. Developers who want to try them out can explore early builds of Java 8 on most platforms. Alternatively, we recommend taking a look at Scala as a way of preparing for the paradigm shifts to come."

    3. Re: Twitter and Scala by lunix123 · · Score: 1

      Java8 for Scala is like a needle compared to a sword. If you want a needle...

    4. Re: Twitter and Scala by swilver · · Score: 2

      Sure, happy sewing with that sword.

      Scala is like a hammer that also can be used to saw, drill, screw and paint! But only if you're an expert and even then only very carefully or you'll cut of your foot.

    5. Re:Twitter and Scala by atrizzah · · Score: 4, Informative

      And yet, read the other answer on that same Quora page.

      I would also add that the opinion of an Engineering VP at Twitter might take into account a whole bunch of things that aren't applicable to the dev who is trying to decide whether learning a language is worthwhile to them. Those are two very different points of view, with very different considerations. I love working in Scala, but if I were building a team of probably over 100 engineers, I might think twice.

      Also keep in mind that Twitter was one of the very early adopters of Scala. They lived through growing pains in the ecosystem that newcomers to the language will never have to encounter.

      Scala has a learning curve, no doubt about it. Its design tends to emphasize features that are very general. You put in some extra effort upfront, but you get more mileage in the long run. Scala also has a very rich ecosystem of libraries that may approach the same problems with different philosophies. Some find the amount of choice paralyzing. It's a bit reminiscent of the React ecosystem. But I think I speak for many Scala fans when I say that it feels very rewarding and empowering as a programmer to work with.

      Intellectual benefits aside, I've also found it to be a language for getting things done. My small team launched a mission-critical distributed system in 6 months, with me as the only veteran Scala programmer. I give a lot of credit to the extremely robust ecosystem of libraries around Scala -- especially Lightbend's Akka and Slick. A lot of ready-made tech mapped very nicely to our problem domain, and we were off to the races. The documentation is great and there's lots of support available.

      My advice for the OP: take the Coursera course and/or give the Red Book a spin. You'll likely be challenged but also you may find it to be very intellectually stimulating.

    6. Re:Twitter and Scala by HiThere · · Score: 1

      FWIW, it's my understanding that Scala strongly emphasizes immutable data, so unless that's suitable to your use case it may be a poor choice. And if it *is* suitable, then you should give Erlang a look.

      OTOH, it you want to interface with a lot of Java code, it may be a reasonable option.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    7. Re:Twitter and Scala by manu0601 · · Score: 1

      The argument was that scala introduces a big learning curve for new developers

      If that is the problem, use PHP instead. Or BASIC.

    8. Re: Twitter and Scala by Anonymous Coward · · Score: 1

      Java8 for Scala is like a needle compared to a sword. If you want a needle...

      I've been using java this year, but it was C#/c++ mostly previously. The biggest things I want are:

      1. pass by reference (yah, probably not happening, but if I can choose only one, I'd take it.)
      2. output variables. Sometimes you don't want to make yet another class/struct/etc.
      3. get/set shortcuts are kind of nice, and more compact.

      Of course a google search pointed out; link
      which basically just uses generics to get around 1 and 2. It is not as compact thought and I suspect the additional overhead may be significant in some cases, though for configuration time and such, by all means, go for readability and if nothing else remember that there is likely a json parser for every language in existence.

      char * function(char * jsonString);
      String function(String jsonString);
      string function(string jsonString);

      I glanced at scala, and didn't see by ref or output. I suppose another bug about java is by default it seems to limit the ram it grabs onto. I've seen trivial xml parsing code blow up for big files where C# just worked. Likely I can fix that, but it is still annoying.

    9. Re:Twitter and Scala by Anonymous Coward · · Score: 1

      When anyone asks: "Should I move to new/different/trendy language X over mature and well understood language Y?" the correct answer is almost always a resounding NO. The language would have to offer some very specific advantage that is outweighed by the porting, tooling, expertise building and any disadvantages it has. For example, I can give you reasons to move from Visual Basic to Java. But it is much harder to argue that you should go from Python to Scala, for example.

    10. Re: Twitter and Scala by Anonymous Coward · · Score: 1

      I love how You have to fight the language to make something half-usable, and even then You can only use this within the context of self-created functions.
      Also, for complex types (You know, when it actually makes sense to pass by reference, and not copy), a java array of such elements is unlike a C array -- it's an array of references to objects, instead of an array of objects. This means that any access to the object requires a double dereference.
      Just stop.

    11. Re:Twitter and Scala by tigersha · · Score: 1

      Or different developers

      --
      The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
    12. Re: Twitter and Scala by lunix123 · · Score: 1

      If you want to sew in the battle...

    13. Re:Twitter and Scala by lunix123 · · Score: 1

      If you want to achieve better code quality then you'll benefit from Scala by referential transparency, safer code and more restrictive type system - if you aren't just a mediocre coder. These things aren't present in java. Most of the java projects used to turn into slow and ugly spaghetti buried in millions of lines of xml. It doesn't matter what domain we're talking about because java isn't the best choice for it.

    14. Re: Twitter and Scala by cyber-vandal · · Score: 1

      Why is there always some wanker on here pretending to not know something to look cool. Fuck off.

    15. Re: Twitter and Scala by atrizzah · · Score: 2

      My impression is that Scala is good for quickly prototyping simple tasks. Leaving aside the meaningless "mission-critical" bit, it looks like you set up a simple web server that could run some jobs in the background on a cluster.

      Well, not really, since we want to know ASAP when these processes terminate. Sure, there's nothing about Scala that is uniquely capable of meeting our requirements. In fact, since Akka supports Java on an equal standing, we could have kept much of the same underlying technology. However, the actual domain logic would have been far more verbose and awkward to model in Java, in my experience.

      On the other hand, if you have a large complex software project spanning many years where you need to use a lot of third party Java libraries and where you want to avoid obscure bugs (everything clean and simple and easy to understand) then Scala is really not the best choice.

      You provide no argument for why the Scala option would have these obscure bugs the Java approach supposedly would lack. Nor why Scala would be any less capable of supporting a "large complex software project". I would assert that Scala's direct support for functional programming makes it better for writing the every - day domain code. This used to be a much more controversial proposition, but at this point, most of the people I know even in the Ruby and JS ecosystems are sold on this sort of "tactical FP" as a way of writing maintainable and resilient code.

    16. Re:Twitter and Scala by jebrick · · Score: 1

      My guess would be that they wanted to use the Scala Agents. Perhaps the Lamdas in the Agents but Agents are built for telecom work. That is where the Akka libraries are helpful. But if they were early adopters Akka libraries would not have been released.

    17. Re:Twitter and Scala by syntotic · · Score: 1

      Absolutely, Italy is safer than Polynesia. Why the question?

    18. Re: Twitter and Scala by audi100quattro · · Score: 1

      How?

    19. Re: Twitter and Scala by gwjgwj · · Score: 1

      Speed.

    20. Re: Twitter and Scala by K.+S.+Kyosuke · · Score: 1

      That's a lousy comparison since C doesn't actually have arrays to objects. It has arrays of pointers to void, perhaps. And as for complex types, because they're all "pointed to", passing by reference is the default in Java. Just like in Smalltalk, you can't do anything else.

      --
      Ezekiel 23:20
    21. Re: Twitter and Scala by K.+S.+Kyosuke · · Score: 1

      Common Lisp has one of the strongest OOP models around, if not *the* strongest one, and lambdas are still one of the fundamental primitives. Hell, in Scheme, even with CLOS derivative extensions, they're even more fundamental. How does the "need for them evaporate"?

      --
      Ezekiel 23:20
    22. Re:Twitter and Scala by bytesex · · Score: 1

      Java is in the Philippines, stupid.

      - I keed - I know it's in Indonesia.

      --
      Religion is what happens when nature strikes and groupthink goes wrong.
    23. Re: Twitter and Scala by ls671 · · Score: 1

      Also, the parent doesn't seem to know about JIT and runtime optimization. Things get optimized so it doesn't have to do a double dereference every time, in a loop for example.

      --
      Everything I write is lies, read between the lines.
    24. Re: Twitter and Scala by luis_a_espinal · · Score: 1

      I love how You have to fight the language to make something half-usable, and even then You can only use this within the context of self-created functions. Also, for complex types (You know, when it actually makes sense to pass by reference, and not copy), a java array of such elements is unlike a C array -- it's an array of references to objects, instead of an array of objects. This means that any access to the object requires a double dereference. Just stop.

      No. It's a reference to an array of references to objects. Except for primitive types, everything is a reference in Java.

    25. Re: Twitter and Scala by luis_a_espinal · · Score: 1

      Java8 for Scala is like a needle compared to a sword. If you want a needle...

      I've been using java this year, but it was C#/c++ mostly previously. The biggest things I want are:

      1. pass by reference (yah, probably not happening, but if I can choose only one, I'd take it.)

      WHAAAAAT? Except for primitive types, everything is a reference (not close, but quite comparable to a C++ reference type). In Java, yes, you pass by copy, but since most things are references, then you are in effect passing by reference (for everything but primitives, and you seldom pass primitives in quantities enough to experience problems for passing them by value.)

    26. Re: Twitter and Scala by ananamouse · · Score: 1

      I am seriously having trouble right now. Maybe making this simple is complicated.
      What is wrong with:
      10 A = 24;
      20 B = 26;
      30 C = A + B;
      40 PRINT C;
      50 END
      I feel like I am not seeing the trees for the forest or something...

  2. Just look at it and program in it a bit by cheesybagel · · Score: 3, Insightful

    Then figure out for yourself if you like it or not. If you're going at this from a PHB perspective just stick with Java.

    1. Re:Just look at it and program in it a bit by cheesybagel · · Score: 1

      I see. You're one of those miserable people that just focuses on whatever does them money. Then just stick with Java and don't annoy us.

      Quiche eater.

    2. Re: Just look at it and program in it a bit by cyber-vandal · · Score: 1

      Imagine wanting to pay the mortgage. We don't all want to live with our parents. Cheetos eater.

    3. Re: Just look at it and program in it a bit by cheesybagel · · Score: 1

      The construction industry and the banking sector appreciate your patronage.

    4. Re: Just look at it and program in it a bit by cyber-vandal · · Score: 1

      If you have any other realistic way for me to own my own home feel free to share.

  3. Re:A lot of my coworkers dont give a fuck by 110010001000 · · Score: 2

    Some people have real lives that don't revolve around work. There is nothing wrong with just working for money. If you want to care about something, contribute to Open Source. That is something which benefits us all.

  4. Rust by 110010001000 · · Score: 3, Insightful

    You should switch to Rust. No wait, Swift, er no, Ruby, er no. Don't worry about the flavor of the year language.

    1. Re:Rust by Pulzar · · Score: 1

      You should switch to Rust. No wait, Swift, er no, Ruby, er no. Don't worry about the flavor of the year language.

      I hear you about Rust, maybe... but Scala, Ruby, and Swift aren't pretty far from "flavour of the year" languages.

      --
      Never underestimate the bandwidth of a 747 filled with CD-ROMs.
    2. Re:Rust by angel'o'sphere · · Score: 1

      All languages that don't run on a JVM (well, Swift does, there is a cross compiler).
      You know that, so why post such bullocks?

      Quite often it makes sense to learn the flavour of the year language. E.g. Swift. Just to broaden/extent your horizon.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    3. Re:Rust by i.r.id10t · · Score: 1

      Or worry about every language - to the point of setting up whatever dev environment and doing a few simple things like hello world, fizzbuzz, create deck of cards, shuffle, and deal a few cards, etc. Just enough to learn how to use the tool chain, basic syntax, user interaction, etc.

      --
      Don't blame me, I voted for Kodos
    4. Re:Rust by asylumx · · Score: 1

      I hear you about Rust, maybe... but Scala, Ruby, and Swift aren't pretty far from "flavour of the year" languages.

      If you did mean this as written, then I just don't get your point.

      If you meant are pretty far I disagree with you. 'Flavor of the year' is a figure of speech meaning they are a fad, and indication is that GP is very correct about a lot of these. Ruby is already yesterday's news, with the MEAN stack and even newer ideas taking its place. Swyft is very new and replaces Objective-C with a C#/Java-like language, which begs the question why don't we just use those?

      My advice to the OP is not to chase languages, but instead to learn what skills make a great developer. It's not what language they know, because that can be learned quickly. It's what problems they know how to solve quickly, how to keep code clean & readable even when that code is doing something complicated. It's about making sure you're not just duct taping things together, but instead you really understand how things work and know how to fix the underlying problem instead of just hard-coding a quick fix for someone to deal with later. Then, move on to more complex architecture. Dev languages aren't what make a candidate for an architect.

    5. Re:Rust by Hognoxious · · Score: 1

      instead to learn what skills make a great developer. It's not what language they know, because that can be learned quickly.

      I agree to an extent, though the stumbling block is the equivalent of vocabulary - knowing all the standard libs and what they do.

      However HR do not. If they want you to have 23 years experience with it then "I know something similar, I'm sure I could pick it up" just won't fly. Bastards.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    6. Re:Rust by Pulzar · · Score: 1

      If you meant are pretty far I disagree with you. 'Flavor of the year' is a figure of speech meaning they are a fad, and indication is that GP is very correct about a lot of these. Ruby is already yesterday's news, with the MEAN stack and even newer ideas taking its place. Swyft is very new and replaces Objective-C with a C#/Java-like language, which begs the question why don't we just use those?

      Yeah, that was a typo, I meant "are pretty far".

      I don't know how Ruby can be included in the list of "fad" languages:

      fad = an intense and widely shared enthusiasm for something, especially one that is short-lived and without basis in the object's qualities

      It's been around for 20 years now, and was quite heavily used for a number of those years. Yeah, it's on the decline, and there are better alternatives available for its most common use, but that still doesn't qualify it as a "fad", any more than Cobol, C, or even Perl, are fads.

      Swift is on the other side of the spectrum -- new, but it has a backing of a company with power to force an army of developers to use it, and hence its adoption is quick and likely to be long lasting. Again, we're not talking about some random "cool" language of the year that will die out before seeing any real use.

      These are simply not languages that I think of when I think of "flavour of the year". I think your bar for that description is much lower than mine.

      --
      Never underestimate the bandwidth of a 747 filled with CD-ROMs.
    7. Re: Rust by asylumx · · Score: 1

      No, I was suggesting that MEAN is the next fad, likely to be followed by others.

  5. Maybe Kotlin by Anonymous Coward · · Score: 1

    At this point in time, you might want to look at Kotlin. It offers a syntax improvement over Java, good tool support, compatibility with Java and a simpler transition coming from Java.

    1. Re:Maybe Kotlin by HiThere · · Score: 1

      Is it stable yet, though? (It *has* been a while since I looked at it.)

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    2. Re:Maybe Kotlin by Foofoobar · · Score: 1

      Actually Groovy is far simpler and integrates with Spring and is 100% compatible with Java. In fact if you take any Java class and change the extension from '.java' to '.groovy' it compiles 100% of the time.

      --
      This is my sig. There are many like it but this one is mine.
    3. Re: Maybe Kotlin by cmorriss · · Score: 3, Informative

      It's quite stable at this point. JetBrains has released version 1.1 and anything written in 1.0 will work long term. We're using it in production and have had zero issues. I honestly don't see how someone could pick Scala over Kotlin if they've actually looked at Kotlin seriously. This biggest win is that it's syntax is close enough to Java that a new team member can read it and understand the code without even having worked in it at all.

      --
      10 minutes working on a sig. What a waste.
    4. Re: Maybe Kotlin by atrizzah · · Score: 1

      It sounds like you're using it as a Better Java, and if so, your conclusion sounds pretty reasonable. Programming Scala like a better Java would be frustrating. You can do it, of course, but most Scala libs aren't very Java-like.

  6. Yes. by Just+Some+Guy · · Score: 2, Informative

    I don't have a strong opinion about Scala, but the answer to questions in the form of "should I Move from Java to _____?" is almost always "yes" (for values of _____ not including PHP, VB*, or other asininities).

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:Yes. by lunix123 · · Score: 1

      The fact is that most companies today despise java and the jvm. The average java shop is a good place for burnouts thanks those talentless javaists who follow the advice/books of mediocre coders. Anyway, java isn't a productive language, especially if you need concurrency.

    2. Re:Yes. by phantomfive · · Score: 1

      I'd love to see the evidence for your 'fact'

      --
      "First they came for the slanderers and i said nothing."
    3. Re:Yes. by tigersha · · Score: 1

      "That's not to say that functional programming techniques aren't occasionally useful when developing graphical interfaces - just that if a functional programming purist tries to put together a graphical interface then the result is similar to what one might get if one tries to repair a car engine using only a set of hammers (an insane mess)"

      True. To a point. But all the ot new tech in the Front-End world is based on a paradigm where you have ONE global state and a function that maps that to a screen. React, Elm, Om, PureScript, Phoenix, all of it.

      The problem with state is not the state. It is taking that global state, putting it into a shotgun and shooting your program full of little bits of the global state. That is what causes the mess.

      I wrote my Masters about global state in functional languages back in 1992, and I find it amusing that the lessons that were learned back then are only now coming to fruition in JavaScript.

      Even back then the rule was simple: Functional languages are not really about eliminating global state. It is about better management of state, and eliminating a lot of the small pieces of state hanging around in the process of transforming the global state from one point to another.

      --
      The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
    4. Re:Yes. by tigersha · · Score: 1

      Actually, the most profound book about concurrency I ever read is "Concurrent Programming in Java" by Doug Lea.

      His book basically became part of the Java Standard.

      But in general I agree with you, Java sucks. The JVM not so much though.

      --
      The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
    5. Re: Yes. by cyber-vandal · · Score: 1

      It's wordy and ugly. It reminds me a bit of COBOL.

    6. Re: Yes. by james_gnz · · Score: 1

      It's wordy and ugly. It reminds me a bit of COBOL.

      I like C-style curly braces, but in general I find VB easy to read. I never had to use COBOL (or the older VB, until recently), so I don't have these associations. VB reminds me of Pascal. I learnt Pascal before C, and never grew to like C syntax.

    7. Re:Yes. by sanosuke001 · · Score: 1

      I don't know; I feel pretty productive in Java. The Data Visualization software we write at work using an OpenGL library we also wrote in Java seems to do quite well. Just because you're a crappy programmer in Java doesn't mean everyone is.

      --
      -SaNo
    8. Re:Yes. by sanosuke001 · · Score: 1

      Yes, great book especially if you do need to write concurrent applications in Java.

      --
      -SaNo
    9. Re: Yes. by techfilz · · Score: 1

      Java is the new COBOL. Not a language for a bit of fun weekend work. It is there to pay the bills.

    10. Re:Yes. by jandersen · · Score: 1

      ... the answer to questions in the form of "should I Move from Java to _____?" is almost always "yes"

      The reason being? As others will have pointed out, Java is used in incredibly many places - Android apps, Java application servers even in Oracle databases. IBM mainframes even have dedicated Java CPUs as an option. In short, there are loads of career opportunities that expect you to code Java.

      And the language as such is easy to learn - if you have learned C, you are almost there. The downside of Java is that it has been taken over by standards for absolutely everything computers do; but the upside is that there is a standard way to do everything, and because they are standards, they work everywhere. There is no good reason to move away from Java, unless you find it hard to learn how to use the toolset. And, as for that, I imagine one would face the same dilemma in Scala, since they live in the same JVM environment.

    11. Re:Yes. by Just+Some+Guy · · Score: 1

      Pay up, Skippy.

      --
      Dewey, what part of this looks like authorities should be involved?
    12. Re:Yes. by david_thornley · · Score: 1

      And this would distinguish Java from most computer languages - how?

      --
      "When you have eliminated the unacceptable, whatever is left, however improbable, must be the truthiness" - Holmes
  7. Re:A lot of my coworkers dont give a fuck by Anonymous Coward · · Score: 1

    If you want to care about something, contribute to Open Source.

    Don't make me laugh. Contributors to "open source" don't care about anything except money. They contribute low quality shit to get noticed, and they pad their resumes with projects they contributed jack-shit to, so they can scam companies into thinking they're fucking rockstar coder gods and get paid rockstar money.

    That is something which benefits us all.

    If you care enough to do something which benefits us all, you write Free Software anonymously, and you don't tell anyone you did it, because the individual doesn't matter as long as the software gets written.

  8. Location, Location, Location by NEDHead · · Score: 5, Funny

    I don't know where Scala is, but Java sounds like a nice place to live.

    1. Re:Location, Location, Location by Stephan+Schulz · · Score: 4, Informative

      I don't know where Scala is, but Java sounds like a nice place to live.

      It's in Milan, Italy. See La Scala. Also a nive place to live.

      --

      Stephan

    2. Re:Location, Location, Location by R3d+M3rcury · · Score: 1

      I thought Scala was dead.

      Oops. Never mind...

  9. For a Project or a Career? by ohnocitizen · · Score: 1

    For a specific project - look at the ecosystem of libraries and tools, and what you want to accomplish. One project might be easier in java, another in scala.

    For a career - look at jobs in your area. Are more people hiring for java or scala? You can learn both of course. Rust is also worth looking into.

    But scala is just a language. You don't need to be "math genius" to use one language over another.

    1. Re: For a Project or a Career? by Hognoxious · · Score: 1

      So looks like e C's fucked, then?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    2. Re: For a Project or a Career? by psycho12345 · · Score: 1

      Seeing as C was backed by the poster boy of massive companies and one of the few convicted monopolists, ATT, I think it did fine.

    3. Re: For a Project or a Career? by Hognoxious · · Score: 1

      That was before my time.

      s/C/C++/. Who's backing the 11 & 14 versions?

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  10. Re:worry not by s1d3track3D · · Score: 1

    Yes, exactly. I'm not sure how you would 'move to scala', unless you are refusing to take a job where you would have to code in java. If you own your own company and make all the decisions then great, otherwise you will have to learn more languages, sometimes whether you want to or not (learn to want to :)

    If you have time and interest work in Scala in your own time, learning a new language is always good, even if there is no direct monetary pay off

  11. Difficult, enjoyable, productivity, consequences by Anonymous Coward · · Score: 4, Insightful

    I have a PhD in CS and have coded in many many languages.

    Difficult: Yes, I find that is the most difficult language I've ever coded in, but I really enjoy it. The difficulty mainly has to do with the type system, the compiler, and what I call Shiny thing syndrome (STS). When first learning I found occasional surprised in assignments because I had the same types on the left and right hand side, but did not. When examining the types, one would observe a page describing it. This can cause frustration for the novice. The compiler messages and the documentation have both improved immensely in recent years, so this is not as bad a problem as it once was, but still, the documentation is not a gentle guide for the initiate to understand the language. Finally, STS. There are some aspects of the language that seemed to have been simply shoe-horned in, often syntactically. That is, there are many multiple ways to do the exact same thing and all where shoved in because they exist that way and were a shiny thing in some other language. This hurts the language in my opinion.

    Enjoyment. I find that when I am coding in Java or other languages I miss features of scala. I have grown to prefer scala over java, which I didn't initially think that I would. I find that I can write a lot of code for 30 minutes in Java or I can sit on my hands looking at the screen for 25 minutes and write for 5 minutes a beautiful piece of code that does the same thing with Scala. The code has an elegance and beauty to it. Actually I don't think I stair at the screen all that long anymore but switching to functional was initially quite the paradigm shift for this old fart.

    Consequences ( Scala is not without its issues):
    1) The difficulty of the language makes it very difficult to be productive with novice coders on your team. Don't do it.
    2) Some aspects of the language: e.g. Macros, implicit parameters, implicit types, can make for elegant code, but can also make your code look like magic that will baffle your (less than stellar) team member. Use with caution.
    3) You will think different after mastering it, that is a good thing. Nothing special about scala, you should learn new languages frequently for this reason.Scala will help you.
    4) Don't do it because it is a hot new language, don't do it because you think it will solve a problem better than another or you'll make more money, do it because you love to code and you want to explore using a new tool set. Do it for the fun. I enjoy coding in Scala much more than java, and the akka actor framework is great. But you will find many analogues to the actor framework (example go routines, rust channels etc)*, but it all addresses the difficulties of multi-threading, which are somewhat cumbersome and error prone in Java.

    *Yes I know they are different, before you pretentiously lecture me on the difference, please realize that I am comparing not contrasting here. They all have the same goal to approach simplifying life in the multi-threaded environment.

    Anyhow, my advise is pursue learning scala with vigor and wild abandon. I'd also recommend go-lang and rust, they are cool also. After you learn them then decide on the tools that you want to work professionally in. You will not be harmed by the effort.

  12. Re:Java is garbage by phantomfive · · Score: 2, Informative

    It exists because in Java, it's easy to work with a team of less-competent enterprise programmers on a multi-year project where new people are coming and going, without your codebase turning into an unworkable pile of garbage. That is the main advantage of Java. It is the COBOL of the modern age, and C# is its twin brother.

    Of course, you can work with a project like that in C (for example), and I've seen it done, but you need to have strong leadership architecting the code and making sure things stay clean. Whereas in Java, you can get by with a mediocre architect and weak oversight and still come out alright (but the C project in that situation will be an unworkable mess. That goes for Python too, and Ruby apparently, if we can judge from Twitter's failure).

    --
    "First they came for the slanderers and i said nothing."
  13. Scala is definitely worth it by iceco2 · · Score: 4, Interesting

    Scala has achieved critical mass, it has shown steady growth over the years and will likely continue. It is entirely possible it will never become as big as Java but that should not be the requirement, it is plenty big enough you can count on it.
    I have been developing large scale projects in Scala for the last 6 years and I can't imagine going back to Java now. Scala makes it easy and fun to write good correct code.
    Scala is boilerplate free, it feels a bit like your favorite scripting languages yet with compile safety a powerful type system and lot's of help from IDE.
    Obviously Scala supports Functional Programming which is essential as everything becomes multi threaded and/or distributed. Scala makes it easy to write functional code and is immutable by default, yet it isn't opinionated and you can use other paradigms when they make things easier/faster.
    It's fun to write, you don't have to be a genius to use it, though with weak members on your team you will want a strict style guide. I found using Scala is a selling point when recruiting top talent, even those who never used it. Those who have used it, especially coming from a Java background are instantly hooked.
    This was verified again in recent Stack Overflow developer surveys where Scala came out to be a very loved language, nearly everyone who tries it falls in love.
    I highly recommend

    1. Re:Scala is definitely worth it by MillionthMonkey · · Score: 1

      If you want to do functional programming there's always JavaScript. [ducks]

    2. Re:Scala is definitely worth it by sproketboy · · Score: 1

      > Scala has achieved critical mass
      No it hasn't. Unless we're talking about in your delusional mind.

      > It is entirely possible it will never become as big as Java
      No it isn't. Unless we're talking about in your delusional mind.

      > Scala is...
      Mostly garbage. Java has everything Scala has and isn't designed by retarded monkeys.

    3. Re:Scala is definitely worth it by lcall · · Score: 1

      Agreed with parent: scala (for me at least) hits the sweet spot between fixing java, not getting in my way and having all the right features, including immutable types, type safety which is great when you need to refactor, and both OO and functional, etc. About using a "style guide", what I would add is that depending on who will probably be working on the project, use a carefully defined subset of scala, as it is possible to write hard-to-read code. Or, just make sure the code reviews catch anything that looks hard to maintain (as for any language), and rewrite those in a simpler style that is more java-esque or whatever fits best.

      I think a java programmer in 1-3 hours can learn the subset of scala that fixes java's annoying parts, and lets then lets you move forward productively. Then if there is someone else on the team willing to answer the occasional question, or they are willing to search for an answer occasionally, they are set. Not rocket science unless you insist that it be hard. But if you want the hard things, they are available. Ie, easy to start, but with all the headroom you will likely ever want. I like things that start easy (enough) but have lots of headroom, libraries, power, a supportive community that has people I want to learn from, and the likely longevity to make it worth my time learning it.

      Scala fits that for me, and I think twitter and others might have had even more success with the "choose the best subset for you" etc approach I suggest here.

      --
      A Free, fast personal organizer for touch typists: onemodel
  14. Kotlin by Anonymous Coward · · Score: 1

    My personal opinion:

    If you're sick of Java's verbosity and various problems, think about Kotlin. Kotlin works really well, has fantastic IntelliJ support, runs on Android, and has fantastic Java interoperability. We already use it for commercial projects where I work.

    Most importantly, though, it fixes the billion-dollar mistake: null. Nullable values are handled beautifully with no overhead.

    It's very much like Swift to my understanding, but it's for the JVM.

    https://kotlinlang.org/docs/reference/comparison-to-scala.html

    1. Re:Kotlin by lunix123 · · Score: 1

      Oh yes, Kotlin - poor man's Scala. I had high expectations... I hoped that they'll make a smaller subset of Scala but instead they've made a C# copy(just like Apple did what made Swift and how Gnome did what made Vala etc.). On a range if Java is 1 and Scala is 10 then Kotlin is a ~4. Dotty will clean Scala anyway...

    2. Re:Kotlin by rbrandis · · Score: 1

      Kotlin is an important language and deserves consideration. As the parent stated, it is very much like what Java 2.0 should be.

    3. Re:Kotlin by Foofoobar · · Score: 1

      Well to correct your Groovy statement... all Java code can convert to Groovy with 100% compatibility; change any Java class extension from '.java' to '.groovy' and it compiles 100% of the time. That because Groovy is just a layer of convenience code on top of Java. Scala attempts to REWRITE Java and thus causes an incompatibility with Java and Java libraries.

      --
      This is my sig. There are many like it but this one is mine.
    4. Re:Kotlin by tgv · · Score: 1

      You've piqued my interest: what's so special about Scala? I always thought it was just another language with a more complex type system, and somewhat less verbose. The only time I met it in real life was to replace a really badly performing Scala application (using Akka, which I didn't try to understand) with a straight-forward Java application, which didn't leave a positive impression, but that was 5 years ago.

    5. Re:Kotlin by lunix123 · · Score: 1

      The type system isn't more "complex" but more "powerful" or more "effective". With a better typesystem you can restrict your program's behaviour more effectively and at the case of Scala exploit the power of category theory. Scala is a functional language and it's easy to achieve referential transparency in it - which makes concurrency and testing easier. The language is rich enough to express flexible and nice DSLs(ex. http://www.scalafx.org/). If you use scala as a better java then you'll miss most of its power, but otherwise you'll write smaller modules which will be more readable.

    6. Re:Kotlin by Foofoobar · · Score: 1

      ...groovy is still stuck with the "mistakes" of java as well which is what Scala attempts to fix with the rewrite. Kotlin is also a rewrite but does a great job of "fixing" java without causing the compatibility issues that Scala creates.

      Kotlin is a nice language as is Groovy; they both provide similar functionality in different ways and compatibility with Java. Scala does NOT provide compatibility with Java. One advantage is that Groovy is much further along and much more widely adopted; it is part of the Android Development toolkit after all.

      --
      This is my sig. There are many like it but this one is mine.
  15. Long way to go by wonkey_monkey · · Score: 4, Funny

    If you want to schlep all the way from Indonesia to Italy, sure, why not.

    --
    systemd is Roko's Basilisk.
  16. Scala or Java? Use Both. by boulat · · Score: 1

    In my humble opinion..

    Scala is great for scripting, iterating, researching, and playing around with various concepts. The downside is that its not binary compatible between major versions. There are some stability issues in production as well, some exciting rabbit holes of error stacks.

    Java is like herpes. Its everywhere and is not likely to ever be gone completely. It is also rock-solid stable in production. The biggest cost is that you have to write it in Java. If only it was like scripting in Python, then this would be a great language. Incidentally Jython is not great for other reasons, but thats neither here nor there.

  17. Relevant article by kimanaw · · Score: 1
    Scaling Scala

    I don't have a particular opinion, other than the common concerns about its performance and resource utilization. But I tend to code at the traces anyway.

    --
    007: "Who are you?"
    Pussy: "My name is Pussy Galore."
    007: "I must be dreaming..."
  18. Probably yes by hibiki_r · · Score: 5, Informative

    First, background: I have been using Java at work, at least part time, since 2005. I started getting paid to write scala since 2012. I've definitely ran large, critical applications in Scala: I am running some right now.

    Scala is a far more featureful, complicated language than Java is. A lot of what it gives you is really very high quality syntactic sugar (case classes, lambdas, pattern matching), but the one thing that sets it apart is its type system.

    The trick is that nothing forces you to use Scala as if you were using Haskell instead: You can use it as a more sugary Java, using the extra type system fun sparingly. Restraint is the name of the game here, and also the reason some people have Scala horror stories: A company decides that Scala sounds great, and then hire some hotshot scalaz committer to teach everyone else how it's done. Then your codebase is full of operators that look like line noise, every class extends a base that comes straight from category theory, and half the developers say 'screw this, let's rewrite it all in Go!'

    There is value in the category theory, and using arcane libraries like cats or shapeless, but 99% of the time, you don't need to: Just like back in the 90s you had to stop people from overusing OO design patterns, or their code will end up looking like Spring, Scala shops have to remind people to do the same when it comes to higher kinded types, hlists and concepts out of category theory. You really don't need any of that to use Scala successfully. Just ending up in a world where you typically don't need either a mocking library or any dependency injection nonsense is more than enough to switch. (Curse you Rod Johnson!)

    The one thing where I would make people spend some time studying is in basics of functional programming, the very first of which is to learn to remove side effects from code, and clearly separate code that changes state from computation. Chances are you were doing some of that already in Java if you were hoping for a good unit test suite, but it's more important in Scala

    Career wise, the more is a no brainer IMO: If you write Java, you are one in a very large pool of completely generic candidates that can use Spring and Hibernate to do something super boring. In Sala, you enter a smaller pool that most of the most average Java developers will never try to enter, so, on average, the job will be more interesting, and the pay will be higher.

    1. Re: Probably yes by lunix123 · · Score: 1

      Then don't chase "new" languages. Chase "better" languages with proactive and honest communities.

    2. Re: Probably yes by angel'o'sphere · · Score: 1

      Scala is such a language, that is why the question was risen.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    3. Re:Probably yes by Anonymous Coward · · Score: 1

      Scala is a far more featureful, complicated language than Java is. A lot of what it gives you is really very high quality syntactic sugar (case classes, lambdas, pattern matching), but the one thing that sets it apart is its type system.

      Maybe I just don't "get" Scala, but in the Scala code base that I have to work with for my day job, I'll see Scala case blocks used to check whether a variable/value is defined. Why not just use a standard "if" conditional black testing for "isDefined" or "isEmpty". At least in the Scala code I've seen, there seems to be a lot of Cargo Cult programming: using the Scala syntactic sugar in order to look hip without actually understanding the intended usage.

      The one thing where I would make people spend some time studying is in basics of functional programming, the very first of which is to learn to remove side effects from code, and clearly separate code that changes state from computation.

      In the code base that I have to work with, we use a lot of third party Java libraries. And these libraries have all kinds of side effects and changing state. Perhaps I'm too negative but my impression is that Scala is designed to be passive aggressive in "encouraging" people to use "good" functional programming practices. This is all well and good if you're purely in the Scala world. But it gets really ugly if you have to try to make Scala play nice with an external library that doesn't do things the "proper" functional way.

      And don't even get me started with Scala and exception handling and try with resources. Typically, the external Java libraries that we're using will be intended to be used in some sort of idiom involving try with resources and a complex set of thrown exceptions. Well, good luck getting Scala to play nice with that.

      My sense if that you need to prototype some relatively simple numerical style algorithms - if you need something like the MatLab scripting language but with somewhat better design - then Scala might be a good choice. But if you need to play well with complex external Java libraries or if you even need the more sophisticated features of the standard Java library (JDK) - for things like low level data reading and writing - then Scala is very much the wrong tool for the job.

  19. Hip and professional by PPH · · Score: 2

    Choose one.

    --
    Have gnu, will travel.
    1. Re:Hip and professional by dhasenan · · Score: 1

      Scala is no longer hip.

  20. Re:Java is garbage by angel'o'sphere · · Score: 1

    the language itself is terrible
    When people write stuff like this, I really wonder about what they are talking. Or which languages they don't find terrible.
    IMHO bottom line all languages except SmallTalk are terrible ... on varying levels of terrible, though.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  21. Kotlin by Moochman · · Score: 2

    Having used plenty of Java in big-ish teams over the years - and mind you, having never used any other JVM languages beyond simple tutorials or scripts - I can imagine that Scala's learning curve might present a problem. Kotlin, on the other hand (as far as I can tell from my admittedly limited experience) adopts many of the best syntax features of alternatives like Scala and Groovy while keeping things simple enough for pretty much any existing Java developer to use right away. On top of that it does not introduce any new APIs or concepts like actors to get a grip on - as such cross-compatibility with existing Java code is 100% out of the box (this was of course a big factor for the JetBrains folks who are using it to develop the future of their IDE platform). And even though Java 8 is a huge advance in terms of functional programming support, it feels like a more natural fit in Kotlin. Essentially I think Kotlin is something like "Java 2.0", or what Java could be if they were willing to throw backwards compatibility out the window. :) At the same time it's dead simple to learn in its entirety in a short period of time, as opposed to Scala's huge feature set and learning curve. Scala may be the "better" language overall, but Kotlin seems like the more practical choice, especially for teams that have no Scala experience as of yet.

  22. Re:Java is garbage by angel'o'sphere · · Score: 1

    Why don't you mention the thinks you consider a flaw.

    Except that I have to write in front of every attribute "private" and most methods "public" I'm not aware of any flaws.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  23. Bigger teams require simpler tools by west · · Score: 1

    The bitter lesson I've learned over the years is that the larger the team, the simpler the tool set and the less clever the implementation must be.

    And it makes sense. You pretty much have to target the 10th percentile programmer in your organization or your going to have your systems ruined over time.

    In a small organization, you can probably hire selectively enough that your 10th percentile programmer can handle Scala. In a large organization (like Twitter is now), not so much.

    1. Re:Bigger teams require simpler tools by west · · Score: 1

      Very good point indeed. You should have posted under a real name to make it more visible!

  24. Re:Java is garbage by Anonymous Coward · · Score: 1

    I've got a long list but can't be arsed to find it. Off the top of my head:

    -No out parameters for functions; you have to pass values you want to return or modify through the return value or through a struct ref in the parameter list.
    -No unsigned integer types. (No, Integer.divideUnsigned() and the rest do not count.)
    -Date/time libraries were complete garbage up until recently.
    -No goto. (I can hear you getting ready to type "B-but Dijkstra said..." Fuck Dijkstra. There's a small but valid list of cases where goto is the right tool for the job (read the Wikipedia article if you are ignorant) but Java doesn't have it like every other civilized language does.)

    Java is baby-proofed language because of the rather low quality of the programmers expected to use it.

  25. Re:A lot of my coworkers dont give a fuck by Kjella · · Score: 1

    They are in it just for the monies. It does make me seriously sad, and one of the main reasons I am quitting my job. But I kindof believe that a lot of workpaces are like that.

    I think that's pretty close to the definition of work, something somebody else wants me to do for money. I think the number of people who are "living the dream" is <0.01% or less. And if I had a billion in the bank it would be a lot more "when I want it, how I want it, the days I feel like it". Like today I'd just like to be a beach bum. Or just soothe a hangover. Or sit inside and play WoW. I'm not complaining about work, as work goes it's very nice. But if money really was no subject at all... nah, I'd quit and do something else. Like, not "nothing" but nothing resembling any paid position. Also if anyone would like to give me a billion dollars to test that theory, I volunteer.

    --
    Live today, because you never know what tomorrow brings
  26. Re:Java is garbage by HiThere · · Score: 1

    You can't be serious. Java has many nice features. But Scala won't get you away from the JVM.

    --

    I think we've pushed this "anyone can grow up to be president" thing too far.
  27. Only If You Plan For Your Code 2 B Incompatible by Foofoobar · · Score: 3, Informative

    With all the Scala hype, people neglect to point out that Scala is NOT compatible with Java; alot of libraries and tools have to be rewritten to work with Scala. This is why LinkedIn dumped Scala, Spring dumped its Scala adaptation and more and more companies are dumping Scala. And for all its hype on 'functional programming', you can do the EXACT same thing in Java and Groovy with 100% compatibility. In fact, every Java class converts 100% to Groovy; take any Java class and change the '.java' extension to '.groovy' and it will compile without issue. The same CANNOT BE SAID OF SCALA! This is because it is not compatible with Java and requires Java rewrites in order to be compatible.

    --
    This is my sig. There are many like it but this one is mine.
    1. Re:Only If You Plan For Your Code 2 B Incompatible by angel'o'sphere · · Score: 1

      In fact, every Java class converts 100% to Groovy; take any Java class and change the '.java' extension to '.groovy' and it will compile without issue.
      That is not necessarily true.
      E.g. if you have attributes with "default" access and a getter or setter it will not compile.

      Regarding this: people neglect to point out that Scala is NOT compatible with Java; what do you mean with that? Java code calls Scala code and vice versa without problems, but I don't use Scala intensively enough.

      This is because it is not compatible with Java and requires Java rewrites in order to be compatible.
      What do you mean with that? Or do you only mean "not source code compatible"?

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    2. Re:Only If You Plan For Your Code 2 B Incompatible by jpablo1 · · Score: 2
      This is very misleading.

      First, Scala's point is not 100% compatibility with Java. You can pretty much use any Java library from Scala but not vice versa (it can be done but you need to take special care).

      Second, Groovy being a dynamic language is in a different league than Scala (or Java for that matter).

      Third, regarding the "hype on functional programming". If you had the slightest notion of what FP is and and how different languages support this paradigm you'd know that you can do a great deal of FP with Scala. Much more than with Java / Groovy.

    3. Re:Only If You Plan For Your Code 2 B Incompatible by Foofoobar · · Score: 1

      Dynamically typing is VERY handy. I can code very quickly in a development environment and then once stable, make sure what I want to move to production is statically typed. It makes your development more agile as a result. Thus you get fast development speed and high scalability. Doing everything statically (and I dont care how good of a programmer you are) takes a LONG time to code, debug and compile.

      --
      This is my sig. There are many like it but this one is mine.
  28. Re:Java is garbage by bugs2squash · · Score: 1

    The big draw of java has to be the inter-changeability of programmers. Sure there are the rock stars, but for every rock star there are many people that corporations have come to see as being generic programmers in various tiers of accomplishment, that they can draw from a large pool and they know what they can generally expect from each level.

    I think it makes sense to learn another language (programming or otherwise) though I think I'd look at one of the classics over scala, maybe even choose clojure

    --
    Nullius in verba
  29. Puff by Oligonicella · · Score: 1

    maintain a hip and professional vibe

    Since *when* has being "hip" been an attribute, much less a desirable one, of a competent language? The only friggin' professionals who speak in those terms are marketers.

  30. Yes by jpablo1 · · Score: 1
    >> "Do you have to be a CS/math genius to make sense of Scala and use it correctly?"
    Definitely no.
    One of the interesting aspects of Scala is that you can transfer many of the skills acquired using OO languages like Python or Java.
    You might find blog some posts and discussion in Scala where the discourse is very technical and presupposes a lot of knowledge of Typed Functional Programming but that doesn't mean that's the common way in which Scala programs are written.
    It rather reflect the fact that people like to talk about interesting and novel approaches as opposed to the "boring" mundane things that comprises 90% of the experience of writing code in any language.

    >> "is it better to just stick with Java?"
    Hell no. I mean, you can learn another language and still do Java when / if needed. Scala provides a nice bridge between the more mainstream OO paradigm and the more principled FP way of writing software like Haskell.

  31. Re:Difficult, enjoyable, productivity, consequence by Snotnose · · Score: 1

    I have a PhD in CS and have coded in many many languages.

    In other words, "I have worked a lot in fake environments in many languages".

    You got a PhD in part because of a language that is controversial, and you consider that a win? The value of a CS PhD just dropped a few points.

    I too have coded in many different languages. Tcl/Tk was painful, but doable. Javascript was painful and not doable. Sed, awk, bash,various assembler, C,, C++, Java, Perl, Python is a subset of languages I've coded in.

    Never used Scalia, probably never will. I'm old, odds are both against having the option, and me saying "not saying this is bullshit, but I'm pretty sure I saw it come out of the bull and hit the ground".

  32. Re:Java is garbage by sproketboy · · Score: 1

    I guess you're just retarded then.

  33. Re:Why not code in Klingon? by audi100quattro · · Score: 2

    Wait, what? if lambdas are shit programming why did almost every language add them as a features in the last 5-10 years? including c++.

    I think you have mostly missed my point, Scala has research oriented roots, and it you're not ok with that, fine. But if it makes you a more efficient programmer, it might just be worth the effort of picking up.

    Also, this is what I mean by pattern matching:
    http://docs.scala-lang.org/tut...
    https://doc.rust-lang.org/book...
    https://developer.apple.com/li...

  34. Re: Perlis Languages by Tablizer · · Score: 1

    Stretching your brain is a good thing, but the work environment cannot assume a ready supply of enlightened developers to maintain high brow code. Some learning is best on your own time.

  35. Re:Difficult, enjoyable, productivity, consequence by UsuallyReasonable · · Score: 1

    You got a PhD in part because of a language that is controversial, and you consider that a win?

    I'm sorry, in what part of his post did he say that?

  36. Fad languages by Tony+Isaac · · Score: 1

    There are a zillion fad languages out there. Each (presumably) excels at something, but most languages that are not in widespread general use will usually suck at anything outside the core competency of that language. Second-tier languages also have smaller communities developing tools and components, making them less desirable. Finally, if you ever need to hire programmers, you seriously limit your pool of available candidates if you lock yourself into a language that is not in widespread use.

    My advice: stick with mainstream languages like Java, C#, C++, JavaScript. All of these languages are powerful in their own way, and there are lots of people who use them.

  37. Switching from Java to Scala by corporate+zombie · · Score: 2

    1) Do you need a degree or to dive into the math to make effective use of the language? No. Like any programming language you can just learn the patterns and apply them. That said, like any programming language, if you learn the math behind why it works you can make more effective use of the language. (You are probably using monoids, functors, monads, and maybe applicative functors in any large program. Not knowing what those are doesn't mean you aren't using them.)

    2) Would I recommend switching?

    I having been programming professionally for 31 years. I have been programming Scala since 2010. I have taught about a dozen people the language. Much like, "Should I quite my day job to put all my time into my startup?", the answer is probably, "not right now". If you can get the same or better pay, under the same or better conditions, then obviously yes, make the switch. Otherwise if the language interests you (same answer for the startup) then work on it in your spare time with your day job giving you the security you need to expand your horizons. As a programmer learning new languages will make you a better programmer. Learning languages like Scala or Haskell which lean so heavily into functional programming and their higher-kinded type systems will definitely expand your knowledge. Additionally you'll then be able to decide if a switch is worth it FOR YOU rather than relying on getting a useful answer from a infinite number of monkeys banging on an infinite number of keyboards.

    All that said no company would pay the price I would demand to code in Java again.

  38. Scala? Yeah, Right. by mveloso · · Score: 1

    I got stuck maintaining a bunch of Scala code at one point, and I'd say "no thanks." Why?

    The code wasn't any more error-free than any other code, but it was an order of magnitude more difficult to maintain. It also didn't seem to speed up the development process any; the devs were just as late as they were without Scala.

    Scala developers are also expensive and hard to find, two things that make finding a "Scala maintainer" a difficult task.

    Unless you're willing to invest in supporting it, I'd say no. If you want a functional language go to a real one, not one built on top of Java. And be sure that the use case for it fits the language.

    1. Re:Scala? Yeah, Right. by cowdung · · Score: 1

      You bring up a good point.

      At the end of the day maintainability is very important in a software system. For many systems I'd say its more important than initial productivity.

      Many features in the language is not as important. In fact, I'm a big fan of one of the most feature free languages ever: Smalltalk.

      So Java has the advantage of being more predictable and more maintainable.
      My big gripe is some of the crazy frameworks you have to deal with.

  39. Scala is great if you use it the right way by wgill · · Score: 2

    No question there's a learning curve, but you don't have to be a genius to learn Scala and use it effectively. Is Scala there to stay? Yes. I've used it successfully at TraceLink, Inc and CiBO Technologies, Inc and am a big fan. Scala is richer and more expressive than Java and eliminates annoyances like checked exceptions. The key is the principal of minimum power (use the smallest hammer that gets the job done) and some consistency in style across the team. If people go meta-nuts with advanced language features, the result can be spectacular failure. If you use the language right, it's wonderful and you can write some great code quickly.

  40. Re:Java is garbage by ls671 · · Score: 1

    Damn, I posted basically the same thing above. See here:

    https://slashdot.org/comments....

    I am surprised that java developers don't seem to know how to create output parameters. As stated in my first post above, I am not saying this is a good idea but here is how you do it if you need to:

    int[] out1 = new int[1];
    int[] out2 = new int[1];
    int[] out3 = new int[1];

    void setOutParameters(int[] v1,int[] v2, int[] v3) {
        v1[0] = 1;
        v2[0] = 2;
        v3[0] = 3;
    }

    setOutParameters(out1,out2,out3);

    System.out.println(out1[0] + "" + out2[0] + " " + out3[0]); // prints "1 2 3"

    --
    Everything I write is lies, read between the lines.
  41. Re:Java is garbage by cowdung · · Score: 1

    Still can't figure out why java exists... It is not just that the JVM is bloated but the language itself is terrible.

    Java exists to bring higher level programming to the masses.

    Before Java we wrote in C and C++ because these were the only languages fast enough for real world use. Using anything else (like Smalltalk, Lisp or Pascal) was considered just silly university theories.

    Java is the language that popularized the concept of virtual machines, garbage collection, and interpreted languages for real world use.

    Note that languages such as Python existed before Java, but they were ignored entirely by industry. Java made it possible for you to even talk about Scala, Ruby, Python, .

    I don't mean to sound like a fanboy but as an "old timer" I feel the need to educate the young who seem to not know their history. Now get off my lawn.

  42. Re:Why not code in Klingon? by ogdenk · · Score: 1

    The chains of code that bypass in nulls, aka Lamdas, monads etc. are just shit programming. Deal with the error where you made the error. Do it clearly and well commented. Making compact code isn't useful, the computer has plenty of space to hold your code.

    You were born in the 90's weren't you?

  43. Re:A lot of my coworkers dont give a fuck by tigersha · · Score: 1

    "If you really care enough to do something which benefits us all, you anonymously create a foundation focused on creating Free Software, and leave your entire fortune to it in your will."

    Yeah, but here is the Catch-22: You first need to program for the $$s to get that fortune in the first place

    --
    The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
  44. Re:Java is garbage by tigersha · · Score: 2

    I agree. Most of the higher-levels language we use today are usable because the computers and implementation technology got fast enough make them practical. A lot of compiler tech, especially in run-time code optimisation and JIT and VM's, came out of years of experience with Java. Al the higher-order abstractions such as Lambdas, Continuations, Closures and such stuff was known in 1960s and 70s, but the implementation tech was just not up to it. In the end, programmer productivity is what counts, it is cheaper to throw silicon at the problem.

    By modern standard the language is a bit archaic, but so in Pascal, and, for that matter, C. But Java was a very important milestone in the process that got us where we are now.

    --
    The dangers of excessive individualism are nothing compared to the oppressiveness of excessive collectivism
  45. Re:Java is garbage by lunix123 · · Score: 1

    I guess you're just an average stupid fanboy then. Keep living in the land of ignorance ;)

  46. Re:Difficult, enjoyable, productivity, consequence by dbIII · · Score: 1

    S'not actually in the post but he nose.


    It's projection. He feels he needs to exert dominance and show that he is better than people with doctorates which is kind of entirely pointless due to different people working on different things.

  47. Re: Java is garbage by cyber-vandal · · Score: 1

    Perhaps because it's one of the world's most widely used development languages and if something works, it's hard to make a business case to rewrite it just because some snob on Slashdot has a hard-on for another language.

  48. Re: Java is garbage by lunix123 · · Score: 1

    Popularity is the weapon of mediocre coders. And sorry, but most java libraries are so bad they need to be rewritten.

  49. Re:Java is garbage by lunix123 · · Score: 1

    You're ignorant af. 1. Java isn't fast. It's ok, though. 2. Smalltalk and pascal is used in the industry. If it weren't for the expensive license of delphi and its one-platform policy, java wouldn't be here today. 3. Garbage collection was present DECADES before java - starting with lisp. Java does have a good gc for performance but at latency it sucks. 4. Java did NOT popularized interpreted languages since it is NOT and interpreted language. Java doesn't even have an interpreter. Scala has. 5. Python isn't ignored by the industry(sadly). 6. Sadly, Scala is on the JVM. But Scala is present on other platforms too: native(as scala-native) and node.js(as scala.js). Python and Ruby isn't - the first even predates Java. The second has NOTHING to do with it. 7. First, educate yourself before trying to educate others. You - javaists are just showing here how ignorant you're.

  50. Re:Difficult, enjoyable, productivity, consequence by serviscope_minor · · Score: 1

    In other words, "I have worked a lot in fake environments in many languages".

    Or, to rephrase what you said "I have my head permanently lodged up my arse".

    You're welcome.

    --
    SJW n. One who posts facts.
  51. Re:Java is garbage by sproketboy · · Score: 1

    No, that would be you if you don't even understand why Java exists.

  52. No by allo · · Score: 1

    No

  53. Re:Difficult, enjoyable, productivity, consequence by UsuallyReasonable · · Score: 1

    He gave you some sense as to why he's experienced in this area. You can choose to believe it or not; you can listen to his opinion or not. Responding snottily, to things he didn't say, seems like a less than optimal choice. Put another way, I got a lot more interesting info from his post than from your retort.

  54. Re:Difficult, enjoyable, productivity, consequence by dbIII · · Score: 1

    First - there was an extremely obvious attempt at a joke (which you appear to have taken seriously and appear to require it to contain information) hence the "Responding snottily".
    Second - how can you get any more snotty than putting down all doctorates as working in fake environments? I really do not see how that does anything other than reflect on the person who is trying to devalue the work of a vast number of others while blowing their own trumpet.

  55. Confused gorila by dna_(c)(tm)(r) · · Score: 1

    Stitch up your enemy? But seriously, programming is nothing like warfare. It is more like crafting a bespoke garment for a gorilla who believes himself to be a six legged, two headed flying dragon. And cleverer syntax and multiparadigm languages make it easier to confuse the gorilla.

  56. SInce you asked ... by nospam007 · · Score: 1

    No!

  57. Re:Java is garbage by Tupper · · Score: 1

    It can, actually. It alternatively compiles to JavaScript.

  58. Fashion? by drolli · · Score: 1

    Should i dress white or black today? Should i wear a fancy shirt or a hoodie when going to work?

    So no, unless you have a really compelling reason (like: the project i am currently doing sucks in java and would be very nice in scala), stay with what you know.

  59. Re:Java is garbage by K.+S.+Kyosuke · · Score: 1

    There were workstation operating systems written in Pascal. (Hell, there were ones written in Lisp, but those required specialized CPUs.) How is Pascal "not fast enough"?

    --
    Ezekiel 23:20
  60. Re:Java is garbage by Hognoxious · · Score: 1

    0. Understand that while OO is sometimes a good thing, not everything is (or belongs in) an object. Math.sin() my arse. It's a fucking function.

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  61. Re: Why not code in Klingon? by Progoth · · Score: 1

    you don't know what pattern matching is. the rest of your post doesn't make too much more sense, either.

  62. Look at the market - not the hype by xtronics · · Score: 1

    I've programmed in more languages than I want to count. In the end it is all code and what matters is the market.

    Code I like:

    Machine code (ARM core is interesting)
    Pascal
    Python

    But what I like isn't important - it is what will provide work.

    A better question is to ask yourself what the return on investment is on learning a new language?
    I thought a lot of the stuff I learned would make me more valuable than it did - most of it is obsolete now or pays very poorly.

    The other thing to consider is with a lot of code work going overseas would it be better to look at stuff that can't leave?

  63. Re:Your starting premise is faulty by Hognoxious · · Score: 1

    This. Do a side project in it & see if you like it.

    If you don't get more than a quarter of it finished, the answer is "no".

    --
    Confucius say, "Find worm in apple - bad. Find half a worm - worse."
  64. Lambda challenge [Re: Twitter and Scala] by Tablizer · · Score: 1

    If you make it possible to attach methods to objects at the lowest levels, then you usually don't need to pass lambdas.

    Take a GUI push button, why can't one simply define an OnClick method for a given button in Java? That shouldn't be asking to much. Simply blur the distinction between class and object, or make it a class-definer option. Java simply has a limited OOP model.

    Can someone present a use-case in typical work coding where lambdas are a must, or at least a huge code savings?

  65. Re: Java is garbage by cyber-vandal · · Score: 1

    Much as I'd like to take the opinion of a clearly godlike hacker as yourself, the fact still remains that no one is going to rewrite all that code in whatever language you think is the One True Way.

  66. Re:Java is garbage by K.+S.+Kyosuke · · Score: 1

    Of course, for your extremely limited interpretation of the words "Pascal" and "competitive", you're right! ;)

    --
    Ezekiel 23:20
  67. Try Ceylon instead by thisisauniqueid · · Score: 1

    Try Ceylon instead of Scala. It's significantly simpler and cleaner, it's modern, and it has perfect Java interoperability. It's actively developed by RedHat's enterprise Java team.

  68. Re:Stick with C and C++ by micahraleigh · · Score: 1

    The C and C++ jobs are few and the applicants for those jobs are innumerable.

  69. Re:Java is garbage by luis_a_espinal · · Score: 1

    I've got a long list but can't be arsed to find it. Off the top of my head:

    -No out parameters for functions; you have to pass values you want to return or modify through the return value or through a struct ref in the parameter list. -No unsigned integer types. (No, Integer.divideUnsigned() and the rest do not count.) -Date/time libraries were complete garbage up until recently. -No goto. (I can hear you getting ready to type "B-but Dijkstra said..." Fuck Dijkstra. There's a small but valid list of cases where goto is the right tool for the job (read the Wikipedia article if you are ignorant) but Java doesn't have it like every other civilized language does.)

    Java is baby-proofed language because of the rather low quality of the programmers expected to use it.

    All these amount to nothing more than dogmatic statements pretending to be axiomatic. I share some of these, but as pet-peeves, nothing more. Nothing in it impedes a competent worker from using it to create quality work (this also applies to Groovy, C#, C/C++, Python and several other languages I've worked with as well.)

  70. Re:Difficult, enjoyable, productivity, consequence by luis_a_espinal · · Score: 1

    I have a PhD in CS and have coded in many many languages.

    In other words, "I have worked a lot in fake environments in many languages".

    Your ego must be very fragile to be trigger like this.

    You got a PhD in part because of a language that is controversial, and you consider that a win? The value of a CS PhD just dropped a few points.

    That's not what he said, but obviously, it is your right to put words into his mouth. Keep banging that strawman, I don't judge.

  71. Re: Java is garbage by cyber-vandal · · Score: 1

    What would you do with the large amount of business critical Java systems oh mighty one? You can't just turn them off because the users still need the functionality. I'm using my imagination but I can't picture how systems with the same functionality in a different language would just appear.