Scala love thread

Why are you learning Java and not Scala?

Scala provides excellent support to FP, while retaining muh objects.
It filters out brainlets and it's growing a lot, plus it's great for parallelism.

There is literally no reason not to switch.

Other urls found in this thread:

reddit.com/r/scala/comments/818qar/quasiquotes_are_no_longer_being_improved/
en.wikipedia.org/wiki/Scala_(programming_language)#Criticism
wiki.c2.com/?SmugLispWeenie
irregulators.org/bookofbrokenpromises/
github.com/lauris/awesome-scala
twitter.com/AnonBabble

> implying i would fell for FP circlejerk

kys

FP is no circle jerk.
It requires more initial effort to understand it properly, that's true.
Howerver it has great benefits: no more hassle on error handling, it's composable and it helps you look at programs on a more abstract level.

reddit.com/r/scala/comments/818qar/quasiquotes_are_no_longer_being_improved/

>Hey dude stop work in shitty Scala and start next version Dotty

Scala is shit (and so is java) but spark is written in scala so I'm stuck with scala.

en.wikipedia.org/wiki/Scala_(programming_language)#Criticism

seems brainlets don't like it

I do like and use scala, but I program hybrid.

Don't really care about making pure FP at this point, just realizing obvious chances for useful pure functions when they present themselves.

Same, working on Spark and hadoop ecosystem currently, hopefully will use akka soon. What you working on?

It's not that easy to learn and has a complex syntax.. I think it needs some passion. If you study it because you are forced to, you will hate it 100x times than languages such as ruby / python.

>It's not that easy to learn and has a complex syntax.

Scala is in fact really simple, you don't need much to use it, the problem is that it allows you to do things many different ways, there is not a "scala" way or a "scala" solution to do things, like there is with python, java or C++.

And that's what is beautiful of scala, you can create your own DSL and make the code look really alien, is a language that service you and not some academic point or any ideology of how to program.

You don't need to learn all Scala to be able of using it, if you want to do pure FP, you can ignore classes and traits, and if you want to do OOP you can ignore match statements and the billion list functions, your call.

But I feel the Scala learning material makes it look like you have to learn everything to be proficient in scala, and that is simply not true.

>Why are you learning Java and not Scala?
Fuck learning, I'm already using picrel
>literally no reason not to switch.
Oh boy, where do we start...
- community split between smug FP weenies and Java++ Pajeets
- decent SJW/CoC infestation
- winner of worst compile times on planet
- shite IDE support
- winner of worst runtime startup times on planet - 3-10x worse than even Java progs
- thus completely useless for unix-style tools
- "I wish I were getting paid to write Haskal" types polluting the ecosystem with libraries with academia-tier usability - category theory knowledge strongly recommended
- same gang unsurprisingly falling prey to fashion driven development. Free Monads for your DB lib? Nah, we Final Tagless now, bitchez.
- cockteasingly restricted type inference
- related leaky abstractions

I'm missing plenty, but too lazy to remember them.

Scala is my favorite language and everything about this post is right, though I would say the official intelliJ plugin is pretty good considering most languages don't even have actual IDEs.

>official intelliJ plugin is pretty good considering most languages don't even have actual IDEs.
Yeah, agreed, actually.
Frankly I'm just parroting some of the complaints of the FP niggers in r/scala - IIRC IntelliJ chokes on fancier type fuckery. Wonder if they'll switch to the LSP at some point.

The main problem is usually Haskell users crying that Scala isn't pure enough and type inference not powerful enough and herp herp.

Meanwhile Scala gets shit done (with SBT, Play, Akka, Spark, Scala-Android, Scalaltra, Spray, PredictionIO and many more...) while it's also improving.

>Haskell users crying that Scala isn't pure enough
Cow goes moo, dog goes bark, smug FP weenies complain about other langs not being as "ideal" as their pet language.
Pretty standard stuff. Fades into the background for me by now. We had the same shit with the previous generation of the gang too: wiki.c2.com/?SmugLispWeenie
>and type inference not powerful enough
Eh, gotta admit that it feels a bit restricted even when not doing anything fancy. Hell, compare defining helper functions in OCaml and in Scala. More verbosity/redundancy than I'd like, frankly.
Though I guess they'd have to special-case more shit in the inference algo to get some of the obvious stuff covered.

because i already know haskell and i don't feel like re-learning the java standard library all over again just to be able to write FP that links with JVM shit

also scala is not a standardized language by any means, the whole thing is still controlled by lightbend, it's not something you should put into production unless you intend to pay them large consulting fees later

> Though I guess they'd have to special-case more shit in the inference algo to get some of the obvious stuff covered.
I wonder if they'll do much special case shit while they're trying to get things done with Dotty. Probably not.

>not something you should put into production unless you intend to pay them large consulting fees later
Might wanna be careful with that FUD.
There's sufficient precedent in terms of industry usage/experience to suggest this is unlikely.

> the whole thing is still controlled by
EPFL. EPFL owns the language, and Switzerland owns EPFL.

Lightbend has key tools / libs like Sbt, Akka, Play, but then so do others for various markets where Scala is used.

Yea. There are like fifty companies that are using Scala which, each on their own, would be big enough to carry a Scala fork if it was required and preferred.

And they'd have the open source license to do so.

>mountain nazis hold referendum and take Scala hostage
>Scala SillyValley users forced to surrender
>alp nazis now control core US telecoms and normienet infrastructure

I already know Haskell pretty well but I've been thinking about picking up an impure functional language. Things always get ugly in Haskell when you start needing Monad Transformers everywhere, need a certain amount of performance, or want to use any kind of state machine or graphical output. I'm torn between picking up F# or Scala (If there are other viable languages let me know). F# seems to have better support for the functional aspect but is all based off .NET but I'm not exactly a Microsoft person, I've heard Mono works relatively well though. Scala, on the other hand, seems to have less functional support but is based around the JVM instead of .NET so you don't need to deal with Microsoft. I could always just try both, but I'm wondering if anyone here has a strong opinion one way or the other.

That would be an extremely curious twist, though I get the feeling that mountain communism with forcing the monopolist ISP to lay down fiber for the competition also and so on might be cheaper than the current thing irregulators.org/bookofbrokenpromises/ .

Anyhow, pretty unrelated to reality, you'll actually keep living "under freedom", with Scala an open sauce language with an academic side to it.

You probably got this right. Maybe you'll like F# better than Scala, who knows.

Scala's ecosystem is definitely more interesting; you're absolutely not the only one that doesn't want to be on the Microsoft ecosystem.

scala center is a nonprofit research group, they are only interested in finding patrons to give them more research funding, unless you want to pony up a donation and then wait a few years, or spend the same few years going to committee meetings arguing your point, then they will do nothing for you

it's a problem when literally ALL the key tools and commercial support for the language come from lightbend, but i suppose it could be worse, it could have been oracle or microsoft instead and then we'd be right back where we started

Because it's already dying, whereas Kotlin is gaining traction

Scala is stronger than ever in cdistributed computing & machine learning. As strong as before on web stacks. Also still doing a lot of various stuff just fine.

Kotlin? Seems to only really succeed on Android right now. But it replaces Java if anything. Few wrote Scala there and I'm not even sure they switched.

In all of this, the JVM probably just grows more dominant and Java isn't getting repaced everywhere any time soon.

If you want to filter out brainlets use a real language like c++ and handle your own garbage

"Real languages" like Cpp fucked up concurrency for decades.

Not real Scala and it's Akka and spark come along and boom, shit works without an all-star team of crack scientists and engineers that are better than even the usual video game engine programmers.

why should i be using scala or kotlin over java

Scala:
Probably because you want to natively use the pretty damn nice libs people wrote, some here:
github.com/lauris/awesome-scala

Though you might also just want a syntactically a lot more powerful and [especially on the OOP side] cleaner alternative to Java.

Kotlin:
Because it's like the above, but without the extra power. For the most part, it's trying to be "just" less silly Java.