Learning Scala for a project and I've been liking it so far

Learning Scala for a project and I've been liking it so far.
Seems like a non-shit version of Java with a more functional style.
Is there any reason not to like it?

Attached: proxy.duckduckgo.com.jpg (1600x1447, 224K)

Other urls found in this thread:

youtu.be/sT6VJkkhy0o
twitter.com/SFWRedditVideos

One is a meme language and the other will actually be used in real life.

They're both pretty disgusting.
I prefer clojure

You know it's bad if it's comparing itself with java.

Avoid Haskell-Heads

Scala is only good at being better than Java. Otherwise it's mediocre and not noteworthy.

It's a JVM langauge

use map(_.toInt) faggot

Java doesn't have map?
I'm pretty sure you can do similar shit in many languages, including C#.

I'm not talking about the code in the picture specifically

they both run on that gay virtual machine. if you want to sell your soul you should know them both.

Kotlin is better

Java is verbose for a reason. Every symbol you strip from a programming language makes your code more vague, increasing the possibility of errors.

Java has had map and lambdas since literally forever ago. Why do people keep peddling this meme?

and as we know, all java programs are free of errors and well written

For what it's worth, most java programs are surprisingly stable for being written by a bunch of uneducated dilettant poos.

Kotlin is the worse part of both

Kotlin is shortened Java with all its shortcomings, but it makes a more writable language.

Scala is much more than shortened Java; it's an academic experiment incorporating interesting things of language theory. It's functional and much more. The lates Java only pretends to be functional and have prototypes but it's more and more usable; it's what Java 1.0 should have been.

Lisp ftw bitches.

That's what Java is for and why the industry loves it: it makes the human factor manageable; any idiot can keep trying compiling his code until it does and then it most likely will be stable.

list.stream().map(s -> Integer.parseInt(s));

That's literally the point of Java, it's designed to enable idiots to write programs. It embeds bureaucracy directly into the software so managers don't have to know anything at all about how it works. Other languages are much less verbose because the extra typing can be replaced by remembering simple rules for how the language works, and dipshits can't be expected to do that.

>Non-shit version of Java
I love how you unemployed fucks are still stuck using Java 7 while the rest of the world has moved on to Java 8/11. Yes Scala can be very elegant when written well, but good luck at managing an entire team through designing a piece of software without killing each other at the 3 iteration. Peace out nerds

Scala is truly a meme. It ended up somehow being less consistent than C++, and it didn't even have the excuse of backwards compatibility.

Just use Java. There is some boilerplate, but typing speed is never the bottleneck.

Haskell ruined Scala for me.

>Kotlin is shortened Java with all its shortcomings, but it makes a more writable language.
Kotlin is just a bad Java remake where the authors changed everything possible in the syntax, only to end up with an equivalent language in all aspects.
It runs in the JVM and has the same intrinsic limitations.
It sucks to learn Kotlin coming from Java, the learning curve is innecessarily steep, because they changed all those stupid things in the syntax, which btw wasn't just Java's syntax, but it came from C++ and C, and was adopted later by JavaScript. It is sad that there are tons of Java and JavaScript programmers that could have learned Kotlin in a breeze and most of them will never touch it because of it's retarded syntax. Not even TypeScript is this retarded.

>without killing each other
Daily reminder that java is what managers crave. You can employ homeless gipsies and eventually they will produce compilable code in about the same time as CS graduates.

>scala less consistent than C++,

"less". I don't think it means what you think it means.

If there is one thing that I truly despise is arrogant cowards who are too afraid to make an actual point and just argue with
>uh oh, you don't probably what that means
>uh oh, you may be just wrong
>uh oh, you would know if you did x
>you think x? lol

If there's one thing I find laughable is ignorants who say "x is y" without mentioning why it is so.

Ok little on Knuth, tell us in which ways is scala less consistent than C++.

Make *your* point first, fucktard.

>Is there any reason not to like it?
JavaVM & Oracle seem like pretty good reasons

oracle does not have control over java anymore. The JVM is the best part of the java envirnoment. If you were not 16 year old retards you would know that.

Scala is Java for white people

>oracle does not have control over java anymore.
pic related
>The JVM is the best part of the java envirnoment.
It's literally the worst multiple non-compatible versions
>If you were not 16 year old retards you would know that.
>I'm not a java shill guys!!!
It's like the only language you learnt was english

Attached: Screenshot_2019-04-17_08-17-00.png (1411x87, 22K)

if oracle controlled java they would break android. Rather, hey have a lion by its tail. They don't dare break anything.

the jvm is "literally" nothing. It's the best way to run software on any platform. Do you see many widely distributed software maintained for win/linux/unix/android/ios/windows phone that are not AAA games? Ah no, because it's expensive. I won't say that everyone should run OneJVM(TM) to rule them all, but the jvm is neat.

>shill
I have never written a line of java. Java has a retarded syntax. I use cooler languages, but I know my CS.

>he doesn't know what he's talking about
pic related
>the jvm is neat
>I have never written a line of java.
I can tell, you shill. just stop posting

Attached: Screenshot_2019-04-17_08-28-06.png (1687x425, 180K)

The main reason not to like it is the stupidly long compile times. You have to spend a lot of effort on tooling to keep a hot compiler running in the background at all times (gradle daemon, etc) else you're staring at 20-sec compiles for simple hello world programs.

It's still a really nice language overall, spanning all the way from the "java with syntax sugar" entry level scala to "haskell on the jvm" full functional meme scala. If you're on the job, you'll tend towards the former, but it's still worth it.

> dynamic typing

Nah. I'd rather use the shittiest statically typed language in existence than use some dynamically typed trash.

t. delusional JavaScript programmer

list.stream().map(Integer::parseInt).collect(Collectors.toList())

at least get it right

>incorporating interesting things of language theory

The problem is that it incorporates them incredibly poorly and subtyping breaks quite few of those "features" and makes compile times ridiculous.

It's like any other modern language though, where the spec and the standard library can do a whole bunch of shit, but about 40% of the features are actively used and maintained, and every project/company has unwritten or written rules against using the other 60%. "typelevel scala" aka scalaz/cats is essentially that 40% of scala that does work well enough for heavy haskell meme programming. If you stay within their bounds, it's fine, but if you try to mix it up with more traditional OO class hierarchies and subtyping, yeah, you're gonna have a bad time.

Is scala as clean of a functional language as idris, or even haskell? No, but it's clean enough, and runs on the jvm, so you can convince people to actually run it in prod.

Openjdk exists, also, major r&d happens at openjdk and since Java SE 7 , openjdk is the official implementation.
>Android
There is no Java™ on Android, Android only runs on ART bytecode.

Get dabbed on with this knowledge, nerd. *dabs*

list.map(int)

What about groovy? Groovy groovs bro

I hear Scala's build pattern is ass and gets to be a beast for larger projects.

But I have no experience.

>It sucks to learn Kotlin coming from Java, the learning curve is innecessarily steep
Jeeze. Java has absolutely crippled you for use in any modern language if you actually think that.

Personally I'm mostly in Kotlin because I like explicit nullables, but I learned it in like a day and was very glad to get out of Java's shitty Streams and lack of good getter/setter syntax.

>any reason not to like it
Scala allows people to code as they like instead of enforcing a style like Haskell. This means that refactoring codebases or optimising code is not possible without rewriting entire functions or classes to match the style of someone who understands the language better.

Bad coders can't be made to improve by the language how to code better because everything is designed to 'just work' if you can write code in the Java style.

Also, SBT sucks. It's slow, farjars require a exceptions list, errors are cryptic, and so on.

My biggest criticism overall is that the language lacks a vision of what it wants to be and has tried to find a place for itself other than a 'better java'. This is what Rich Hickey got right with Clojure that wasn't got right by the Scala team.

There is meant to be a break between Scala 2 and Scala 3 which might potentially chase away what people little commercial support there was beyond dressing for Spark applications.

These changes are the most worrying thing about Scala as the language is trying to figure itself out at the expense of losing what commercial relevance and users are still using it. The exodus has already begun with LinkedIn moving back to Java.

Overall, the language itself has a lot of good ideas and would satisfy 99% of programmers who want to write elegant code.

As rightly points out, Scala is your only chance of using FP in production in a realistic setting. No one will take a chance with non-JVM or CLI languages and Clojure's lack of typing or class system doomed it to webshit applications.

>My biggest criticism overall is that the language lacks a vision of what it wants to be and has tried to find a place for itself other than a 'better java'.
I 100% agree with this. Just by looking at their website, it's clear that it doesn't really aim at being "good", just a "better Java".
This means that once Java itself becomes better (it already has since the creation of Scala) it effectively loses any reason to exist.
You're also right that not enforcing a style makes refactoring harder. Many people dislike Java because it enforces a particularly rigid OOP style, but it does pay off in large teams:
all the code is written in more or less the same way across the entire team (which may be hundreds of people), thus making it easier.
It's true that such inflexibility is overkill for a small team, but it's beneficial for large teams.
I have never used Haskell, either professionally or personally, but I can see a similar benefit in enforcing functional purity.
The 2-3 break, frighteningly similar to Python's, may end up killing the language. Python managed to overcome it because it's way more popular, but Scala really isn't in comparison.

While the language does have some interesting features, they really just feel bolted on and not integrated together, therefore contributing to that lack of vision.

All of the JVM languages exist as an attempt for developers, trapped by the gravity of Java, to have some opportunity to try something else. But they end up succumbing to the necessity of Java interop and business requirements.

>Scala is your only chance of using FP in production in a realistic setting.
Haskell is becoming increasingly used because you get first class parallelism for almost nothing, and STM, on top of its other benefits. Facebook and an number of large banks use it internally for various backend systems.
youtu.be/sT6VJkkhy0o
It will take awhile, but Haskell is slowly making inroads into mainstream development where it is needed.

Meh. I wouldn't call myself TRAPPED to the JVM, especially now that dot net core exists. I just find it to be the most full-featured multi-platform stack that also performs well. Plus if we're being honest, every single one of the JVM languages (or at least Scala, Groovy, and Kotlin) had some really neat new ideas (well probably someone came up with them first, but still things you don't see in the major languages). I see C# is adapting some of them in its next major version which is nice.

And honestly, most of the limitations you run into aren't that significant if you don't care about micro-optimizing peak performance.

>Haskell is becoming increasingly used because you get first class parallelism for almost nothing,
Now that you mention it, avoiding side effects as much as possible does make parallelism much easier.

>how to make something less readable: the image

Java is fine, it has all this meme shit in it anyway these days

I thought the entire point in the functional meme was immutability, which I am all for, but that doesn't mean you need to have stupid syntax

>less readable
Even C# faggots can get a basic list re-mapping. But apparently it hurts the Javalet's head.

There is no implementation of STM that is worth using. The performance is absolutely atrocious in Haskell and even worse in Clojure. It's not useful outside of trivial toy examples.

Google, IBM and Microsoft have been researching STM for over a decade and have largely abandoned the idea for good reason.

It doesn’t scale well but it’s perfectly fine for smaller loads which require transactions and will save a lot of boilerplate.

For smaller workloads you're still far better off just using parallel streams or the utility classes in java.util.concurrent.