[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
What do you think about Scala, /g/?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 42
Thread images: 6
File: scala-logo.png (8 KB, 635x282) Image search: [Google]
scala-logo.png
8 KB, 635x282
What do you think about Scala, /g/?
>>
It is Java++.

gateway drug to functional programming, or a replacement for Java in the enterprise world? Marketable skill? I don't know.

But I'm having fun reading Functional Programming in Scala
>>
It's shit
>>
It's really great IMO. Interop with other JVM-based stuff is great and the verbose nature of Java doesn't really carry over at all.
>>
>>51829287
It's a buggy mess, but at least it's not java.
>>
I wish I could use it instead of Java.
>>
>>51829287
Based on Java so it's shit.
>>
>>51829287
I write Scala for my day job. We try to be principled in our usage of it, and eschew those language features which lead one away from the light.

We'd rather be using Haskell, but at least we aren't using Java.
>>
>>51829287
I think he's a biased fuckwit who picks whatever argument supports the position he favors.
>>
>>51829287
only used it once, to write views/templates for play
it was okay, i guess. don't see any reason to use it though.
>>
It is good and sexy
>>
>>51829324
u sound retarded until your last sentence.

Red Book is the bible in our company
>>
>>51829374
how is it remotely buggy?
>>
>>51830788
it works for small projects, but it really only shines for large / complex projects.

as much as i love it, it wouldnt be my goto for smaller web services.
>>
>>51830690
judging by your english, you must be one of those monads endofunctor fuckwits
>>
https://www.youtube.com/watch?v=uiJycy6dFSQ
>>
>>51829287
I like it a lot, as improved Java. Would recommend using it.

I think if you're trying to use it exactly like Haskell, you can have some trouble with it.


But then again, that's kinda the nature of trying to use anything like Haskell. It's hard enough with Haskell itself...
>>
>>51829287

i think clojure is nicer.
>>
Literally the poor man's C#
>>
>>51831386
lol

It's multitudes better than C# which is basically just Java++.

F# then again...
>>
File: 1412536845823.jpg (34 KB, 415x570) Image search: [Google]
1412536845823.jpg
34 KB, 415x570
>>51831386
>>
>>51831386
C# is far poorer than Scala.
>>
>>51829324
It isn't a replacement, it's a supplement.
At work, all of our older backend stuff is written in Java. A lot of newer stuff, plus a few various scripts, are Scala.
They play nice together, so you can import Java libraries in Scala and Scala libraries in Java.
>>
>>51831427
Scala runs on the JVM ya dingus.
>>
>>51831320
Use his library if you must:
https://github.com/paulp/psp-std

But really, the problems he points out are very trivial unless you're an FP purist. If you've programmed other languages, warts like this won't be new to you, but usually you don't even care. You just get your code done...
>>
>>51831472
No shit.
>>
dead and gone
>>
>>51831550
What, Scala? Lel,no.

Akka, Play and Spark and more are in a lot of places now. Lots of big shops are using Scala.
>>
File: akka-logo-cloud.png (42 KB, 940x200) Image search: [Google]
akka-logo-cloud.png
42 KB, 940x200
>>51831570
Here's some of the Akka user base.
>>
File: odersky.jpg (127 KB, 1920x1080) Image search: [Google]
odersky.jpg
127 KB, 1920x1080
>naming your mixins 'traits'
>>
File: Martin.jpg (87 KB, 480x640) Image search: [Google]
Martin.jpg
87 KB, 480x640
>>51831668
Yes?

https://en.wikipedia.org/wiki/Trait_%28computer_programming%29#Supported_languages
>>
File: Philip-Wadler.jpg (9 KB, 199x216) Image search: [Google]
Philip-Wadler.jpg
9 KB, 199x216
>>51831733
By the way, if you read the top of that article, you can see that traits and mixins aren't exactly the same thing.

In short, it makes sense.
>>
>>51831478
>But really, the problems he points out are very trivial unless you're an FP purist.

that's not true. type-unsafe equality + type inference is a recipe for disaster.

once i pushed a code where this hit me, and I ended doing ```Person( firstName, lastName ) == Some( Person( firstName, lastName ) )```

which will obviously evaluate to false all the time no matter what.

was a horrible day for me. :(
>>
>>51831964
just to clarify the expression reduced to that final thing, that's not literally what i wrote in the code.

scala accepted it happily.

>>51831478

and more over, things like scala not being able to optimize map / filter is at least one factor that forces you to choose between performance and readability unnecessarily -> and this basically boils down to mutability
>>
>>51831964
> once i pushed a code where this hit me, and I ended doing ```Person( firstName, lastName ) == Some( Person( firstName, lastName ) )```
Trivial to see in a debugger?

I can see how it can happen, but really, little shit like this is stupid, but I've seen decades of stupid. This much doesn't even bother me anymore. You just find that it happens, fix it, done.
>>
>>51832007
unfortunately, bugs like those are sometimes the difference between happy users and 10,000 pissed off users.
>>
>>51831998
>and more over, things like scala not being able to optimize map / filter is at least one factor that forces you to choose between performance and readability unnecessarily -> and this basically boils down to mutability
Sure, sure, there are more warts. And you'll use non-FP style to get around some of that, at least if you're like me.

You know, whatever works. We are not in the age where it is practical to write extremely nice code yet, as far as I'm concerned. "Okay" will have to do...

>>51832045
Could suggest having test servers that run somewhat extensive test suites. Or human QA. Or both.

That way, you'll probably only piss off 10-100 users on the stuff that slips through.

Can't really do better than that unless you have an abundance of time for each feature / line of code, which I doubt you have.
>>
>>51829287
Not really sure what to think of it. I know it uses the JVM. I know it is compatible with Java libraries and such but that is really the extent of my (lack of) knowledge.
>>
>>51832242
Could have a look at a bunch of sample code:
http://rosettacode.org/wiki/Category:Scala

To me, the relative cleanliness of it vs Java was partly what made me try it.
>>
>>51832138
i'm part of a startup with limited monies in the bank, so can't afford to have a qa for everything.

that said, after that incident, we started using scalaz typesafe equality for _all_ our case classes, and wrote our own for GenTraversible.contains

and over the past year, we have tons of tests guarding stuff like this as well.
>>
>>51832138
yeah agree. us hascalators can sometimes be way too harsh on scala. :)

missing the forest for the trees sometimes
>>
>>51829287

It sure SCALES well. Get it?

HAHAHAHAHAHAHAHAHAHAHAHAHAHA
Thread replies: 42
Thread images: 6

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.