Live data from Hacker News

The Last Hope for Scala's Infinity War [video]

youtube.com

41–50 of 76 posts

Re: The Last Hope for Scala's Infinity War [video]

#41
post #35

I dumped jvm languages for Rust. Scala _really_ needs to die.

They serve totally different purposes.

Rust is great if you want a language with a lot of type/bug safety and want to be able to compile it to run naively on everything from servers to embedded devices.

Scala tries to bring a functional language that can utilize everything that already exists on the JVM, including all the classic Java libraries, while providing a lot of FP idioms, pattern matching, etc.

If you write good Scala code (basically avoid anything and everything written by TypeSafe/LightBend ever .. except for TypeSafe Config .. that one is okay, and it's in Java), you can have some really awesome, clean looking code and programs compared to their Java equivalent boilerplate.

They both have their purposes.

Re: The Last Hope for Scala's Infinity War [video]

#42
I was thinking about Python3/Perl6 as he was talking and glad when he brought it up.

It's important to note, the world has transitioned to Python3. Django removed the py2 comparability imports a while ago and the Python3 Wall of Superpowers stopped updating a while back when it was over 90% green.

For most devs, all new Python code that's green field is Py3. There is still a lot of py2, yes .. a lot in commercial/closed apps that have embed python in there, along with scientific applications. But I think that will change eventually too.

Perl6 is the opposite end of the spectrum. Massive Perl codebases will always be Perl5. I don't see any enterprise people going to Perl6. If you're like Booking.com and still using Perl for everything, you code is probably so decrepit, old and lacking meaningful testing you should just burn your entire company to the ground so your devs are no longer in miserable agony.

He has a point with Python3: it is a large community. Even with that large community, and even with how small many of the syntax changes were, it took a long time to get to py3! Scala is nowhere near as big.

Scala needs to move carefully with Scala3, so that Scala3 is more like Python3 and doesn't end up like Perl6.

Re: The Last Hope for Scala's Infinity War [video]

#43
post #34

Earlier quoted context omitted.

> I've seen lots of people suggest that OOP+FP fusion is what allows Scala to provide an easy gradual on-ramp to FP for people and projects transitioning from Java, which is Scala’s key value proposition. I feel like I'm at the tail end of that on-ramp, and while I'm still as a whole really appreciating scala, I'm starting to wonder what the end-game is. Now that I understand and am comfortable with all the functiona…

> scala, I'm starting to wonder what the end-game is The end game back in the early days of Scala was probably to provide a gradual on-ramp to FP for people and projects transitioning from Java, but it probably changed to a commercial purpose once more people got involved in its development. It's long since become a self-preserving product, and probably even tries to hinder people moving from FP-only Scala on to Hask…

Funny I was thinking of Groovy while reading the parent as well. I always feel like any language that defines itself in the shadow of another language is challenged to find its own true identity. Something I like about Groovy though is that it doesn't have pretenses: it shamelessly tries to be as close to Java as it can. They are busy right now redesigning the syntax so you can write '=>' instead of '->' in lambdas just so it can be more "java-like". I can't think of a more pointless change from a functional point of view but they are doing it anyway. When I use Groovy, I'm not doing it because "Java is bad", I'm using it because "Java is good" but "Groovy is better". When I code in Scala I keep feeling bad every time I divert back to Java-style and constantly struggle to figure out what paradigm is right and when to switch between them.

Re: The Last Hope for Scala's Infinity War [video]

#44

I was thinking about Python3/Perl6 as he was talking and glad when he brought it up. It's important to note, the world has transitioned to Python3. Django removed the py2 comparability imports a while ago and the Python3 Wall of Superpowers stopped updating a while back when it was over 90% green. For most devs, all new Python code that's green field is Py3. There is still a lot of py2, yes .. a lot in commercial/clo…

> and still using Perl for everything, you code is probably so decrepit, old and lacking meaningful testing you should just burn your entire company to the ground

What makes you think that? The perl community pioneered a lot of the current best practices around testing.

A lot of the old perl code bases are still around because there is no compelling reason to move away from perl.

Re: The Last Hope for Scala's Infinity War [video]

#45
post #30

SBT, implicits, CoC controversy and censorship, scalaz/cats debacle... There are more reasons not to get involved with scala ecosystem than to get involved. I think people get snippet fever when they see a few lines of really pretty code and they forget how tangled up the scala scene actually is. I can't believe, after seeing more Rails disasters that I know what to do with, that I'm looking at a software project and…

F# will gain more traction once the C# HKT proposal champion gets approved and merged (which will be a CLR change)

Re: The Last Hope for Scala's Infinity War [video]

#46
post #11
post #6

Earlier quoted context omitted.

Discouraging OO would be the worst thing Scala could do. Its one really unique capability is the fusion of OO and functional: it's a language that can go toe-to-toe with Haskell, yet also one that lets you switch from Java in a weekend. Take away the OO support and you'd have just another functional also-ran. Sadly while the language itself has excellent OO support and Java interop, the community support just isn't t…

I dunno, I think the DeGoes has a point. Like he says near the end, there's this fiction that an OOP+FP hybrid will be loved by both OOP and FP programmers, when many times it actually means both will dislike it and the language will be mediocre at both goals. My opinion -- and I mostly write Scala in my day job! -- is that Scala is in a truly difficult position. Its OOP (and Java) DNA hurts its FP aspects. If it goe…

> If it stays like it is and tries to be a "better Java", it will keep losing ground to more practical and "easier" languages on the JVM, possibly including losing to Java itself!

Well, to my mind the FP is a means to practical ends. I'm not attached to Scala qua Scala, I'm attached to HKT and typeclasses because there are practical problems I can't solve without them. As long as Scala has those things and Java or Kotlin don't, Scala will have an advantage - and if Java does adopt those things I'd say mission accomplished. (I mean, Odersky's original goal was to improve Java, right?)

Re: The Last Hope for Scala's Infinity War [video]

#47
post #8

Earlier quoted context omitted.

Partial functions are undefined outside of the part that is given, therefore the result of an input that falls in that zone is undefined. This is not good, how do you deal with it, exceptions? Termination? You must make the function total by extending it to a version that gives some result to manipulate whatever the input (or restrict the domain to make it again total.)

So the idea would be to allow currying, but not allow partial application of the currying?

Currying always returns another function (if I’m not mistaken it doesn’t even evaluate anything yet) so it’s another thing and the compiler has a complete understanding of what will happen at runtime. With a partial it won’t be able to do that. The later comment with the Try[] is a great example

Re: The Last Hope for Scala's Infinity War [video]

#49
post #30

SBT, implicits, CoC controversy and censorship, scalaz/cats debacle... There are more reasons not to get involved with scala ecosystem than to get involved. I think people get snippet fever when they see a few lines of really pretty code and they forget how tangled up the scala scene actually is. I can't believe, after seeing more Rails disasters that I know what to do with, that I'm looking at a software project and…

F# will gain more traction once the C# HKT proposal champion gets approved and merged (which will be a CLR change)

Where can I get more information about this effort?

Re: The Last Hope for Scala's Infinity War [video]

#50
post #30

SBT, implicits, CoC controversy and censorship, scalaz/cats debacle... There are more reasons not to get involved with scala ecosystem than to get involved. I think people get snippet fever when they see a few lines of really pretty code and they forget how tangled up the scala scene actually is. I can't believe, after seeing more Rails disasters that I know what to do with, that I'm looking at a software project and…

   abandon implicits entirely,
What's wrong with (carefully used) implicits? What would you replace them with? Haskell has type-classes, a very similar concept, and it's difficult to imagine contemporary Haskell programming without them.
Post reply on HN