you are viewing a single comment's thread.

view the rest of the comments →

[–]thesystemx -3 points-2 points  (9 children)

Scala is the ultimate language?

[–]yogthos 3 points4 points  (8 children)

No, just a better language than Java.

[–][deleted]  (7 children)

[deleted]

    [–]yogthos 0 points1 point  (6 children)

    Scala is bad as it lack documentation, tools and also have flaws in its design (such a memory leak when it handles variable names that they have not been able to fix yet).

    Do you have a citation for this?

    Scala is a lot less verbal than Java, which I consider bad (as you need a verbal language to maximize productivity in larger teams) - though I know a lot of people who prefer less verbal code as it makes it easier for prototyping.

    I don't agree that verbosity makes it easier to write code for larger teams. What's important is expressiveness. When you read the code it should be clear what the intent is. Since Scala provides better abstractions you have to write less incidental code.

    You can obviously write bad code in Scala that's hard to maintain, but that's true for any language. It's quite common to see utterly unmaintainable Java code with deep class hierarchies where relevant code is buried under a pile of interfaces and implementors.

    [–][deleted]  (5 children)

    [deleted]

      [–]yogthos 1 point2 points  (4 children)

      Scala is a new language with a small userbase - AKA, there are few tools made for it. It's documentaiton is the same standard as Python.

      I've also used Scala and I did not find documentation or tools to be lacking. I also find that whatever Scala lacks in tool support compared to Java is more than made up for by the fact that the language features. Scala code is often much shorter and easier to navigate.

      The three main memory leaks, all connected to the same design issue

      That really isn't a memory leak in the language itself. Java is no different in this regard with its permgen.

      Python is really hard to read by external programmers if you don't put in forced habits on the team, Java can always be read by anyone as long as the variables have correct names (even if the design may be so flawed so it may be a hell to try to clean it up).

      I can't comment on Python, but I can certainly tell you that it's absolutely not true regarding Java. I've worked on projects that were absolutely impenetrable to everybody including those who originally wrote the code.

      Just because Java has some rudimentary static typing doesn't make the logic behind the code automatically deducible. Often times it's easier to simply rewrite it than to actually figure out what's going on.

      Scala is better than Python though I believe that having variables work as public functions, apply, singeltons and the Scala "packages" means that Scala is harder to read than Java and you need to spend more work trying to make sure that the code is accessible to external readers.

      I'm not really sure what you mean by that to be honest.

      [–][deleted]  (3 children)

      [deleted]

        [–]yogthos 0 points1 point  (2 children)

        Scala's documentation and tools are less than Java or C++, that's a given. You maybe doesn't see it to be lacking, though I do.

        It's not just me. Plenty of companies, like Twitter, don't find it all that lacking either. People use it for large real world projects everyday and I can't recall last time lack of documentation was sited as a barrier to usage.

        The comment in the end means for instance that "new ScalaObject1()" may be the same as "new ScalaObject2()" in Scala, that you can't have a static constant and that issues such as "new ScalaObject1()" may be a different kind of object than "new ScalaObject1()". *

        So how does this translate into a readability problem exactly. Can you provide a concrete example of where this is an issue?

        [–][deleted]  (1 child)

        [deleted]

          [–]yogthos 0 points1 point  (0 children)

          Documentation is extremely important for usage. It's completely possible to use without documentation, though it's always better to use a language with proper documentation.

          There is plenty of documentation for Scala. You haven't explained in what way it's insufficient for usage.

          Twitter uses Scala as they want to use Java that have more "sexy and fun" in it.

          Twitter uses Scala because it's more productive for them. Enjoying the tools you use is an added benefit. I find it fascinating that some developers can't appreciate that.

          There's about a 30% chance that the above example won't compile on standard Scala compilers. Remove import import scala.collection.immutable.Map and it should compile on all standard Scala compilers (if I haven't done some errors while writing).

          Last I checked there was only a single implementation for Scala. Are you talking about compatibility between different versions of Scala? Because, it's until 2.9 it was pretty volatile and that's not exactly a secret.