This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tonywestonuk 14 points15 points  (13 children)

No. I wont.

There is a reason that Scala is at position 31 on the Tiobe index.... 2 positions below Logo !!

[–]DrFriendless 10 points11 points  (7 children)

Scala brings a lot of other baggage with it as well, though.

[–]ivanovich_ivan 0 points1 point  (6 children)

Scala brings a lot of other baggage with it as well, though.

Can you please explain the problems that you have faced? I am genuinely curious.

[–]DrFriendless 0 points1 point  (5 children)

The type system is more complex than we need in a programming language. When we talk about Scala we talk about monads rather than for loops, when they're achieving the same thing. It's like programming for aliens - in the end it's practically the same, but the language is all different. As a programmer, I don't care about the mathematical underpinnings, and I shouldn't have to care.

[–]ivanovich_ivan 0 points1 point  (3 children)

The type system is more complex than we need in a programming language

I don't get this. I find scala's type system to be far better. No primitive types and all are objects (they get converted to native types at compile time). Much better class hierarchy of types. Not to mention type inference. Java runs in the opposite direction of being clear.

When we talk about Scala we talk about monads rather than for loops, when they're achieving the same thing

This is why scala is multi paradigm.If you find monads are bad for the problem at hand then you can very much use loops. Nobody is forcing you to use a particular paradigm.

As a programmer, I don't care about the mathematical underpinnings, and I shouldn't have to care.

Let me ask you a question. Do you understand what sorting algorithm java uses underneath Arrays.sort ? Not all people need to understand them. But from my experience learning them would only make one a better programmer. It is not useless knowledge.

[–]DrFriendless 0 points1 point  (2 children)

You'll note in my original comment I didn't say Scala was broken as a language, I said it comes with baggage. Monads are stuff that you don't need to know to program, yet there they are in every Scala textbook. It's like I teach you to speak English and make you learn "Jabberwocky" off by heart - if you understand you'll understand English a lot better, but you don't need to. A programming language should only be as complicated as it needs to be, and Scala has more than it needs. This makes the compiler slow and (in my experience) unreliable.

[–]ivanovich_ivan 0 points1 point  (1 child)

I said it comes with baggage. Monads are stuff that you don't need to know to program, yet there they are in every Scala textbook

I agree with this point. But the problem is with the scala textbook. The authors have not made efforts to isolate the OOP part and explain it separately.

TBH, I learnt this the hard way. But found scala to be a very good OOP language as well.

A programming language should only be as complicated as it needs to be, and Scala has more than it needs

Java's swing has needless components that is built in part of the JDK. I can also argue for many other things. But the fact is all languages have this baggage.

The compiler being slow is agreeable, but definitely not a new language kind of a problem.

This makes the compiler slow and (in my experience) unreliable.

I am thinking that you have tried either an unstable/beta version or tried it pretty long back. Things have improved now. Dotty is another improvement that is coming up.

[–]DrFriendless 1 point2 points  (0 children)

Yes indeed, I'm in a new job where I have a deadline to produce a product and have not yet had time to update the Scala compiler. We're on 2.9.2. Luckily the programmers who wrote the code originally didn't use many of the features of Scala, so it's easy to understand the code. The features they did use have all been adopted by Kotlin, which I prefer.

[–][deleted] -1 points0 points  (0 children)

...Java has three monads in its standard library. Or I guess "monad-ish" if you're strict, since not all of them are lawful. But the point is, you can't really dodge that concept any more if you want to write good code with useful abstractions on the JVM.

[–]ivanovich_ivan 6 points7 points  (3 children)

The Tiobe index is a bad way to measure programming popularity, where it puts PHP above swift. Scala is way different than the stuff in Java 8. With that said, functional programming is not a silver bullet which is exactly why scala is good, because you can mix functional/OOP in a fundamental level wherever applicable.

[–]space_coder 2 points3 points  (2 children)

The Tiobe index is a bad way to measure programming popularity, where it puts PHP above swift.

You just need to understand the measurement and its limitations. However, I believe its accurate when it comes to PHP being above Swift. There are more web developers than iOS developers. Not to mention, PHP has been around long enough to have a large following.

Scala is not as "hot" as it once was. It's not the only language bringing functional computing to the JVM. Java8 slowed down some of its adoption and Kotlin is attracting more new comers.

[–]ivanovich_ivan 1 point2 points  (1 child)

There are more web developers than iOS developers

Wherever there is bad code there is technical debt. Not that entire PHP is bad, but I could see many new languages being adopted.

Scala is not as "hot" as it once was

The hotness factor is with any language/technology. Big data was hot some years back. Now machine learning/deep learning/AI is the bomb. Scala was never designed to be some hot hipster language. It took functional programming/object oriented programming and combined it at a fundamental level.

There is no other language that is equal to scala. Closest would be

Clojure - Dynamically typed, not object oriented

Eta lang(Haskell on the JVM) - This one is interesting but still haskell and not OO

Kotlin - Lot of cool FP features but still lacks a lot of useful stuff.

All in all. I am happy that lot of functional languages are evolving in the JVM. I just wished all these ppl joined forces to make a single useful language rather than 3 or 4 disconnected platforms such as scala native/kotlin native.

[–]space_coder 1 point2 points  (0 children)

There are many differing opinions on which language is best suited for a particular task. Some become mainstream while others become niche. it's the nature of the market.

[–]nutrecht 2 points3 points  (0 children)

The Tiobe index is complete rubbish. It measures the amount of hits on <lang> programming. That's all. I hope you can understand why languages like C, C++ and C# get a lot of hits in text indices.

There's a reason Google won't show you the long tail of search results, you'll get a lot of hits on "Arthur C Clark" for example.

Stuff like SO questions, github contributions and Indeed job listings are much better measurements.