News for hackers. Stuff that matters.
Re:The Last Hope for Scala's Infinity War [video] by the_af on Wednesday July 11, 2018 @05:57PM (#17510598)
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 goes full hardcore FP, it will probably lose relevance (because most programmers can't be bothered with it, and those who can will probably hope for Haskell on the JVM). 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!

PS: DeGoes didn't sound disrespectful to me, and bear in mind I don't know who he is. He seemed to be arguing out of practicality, not shouting people down. I don't if he is angrier in other forums, but his tone in this presentation sounded closer to a wake up call to me.

Re:The Last Hope for Scala's Infinity War [video] by lmm on Thursday July 12, 2018 @01:24AM (#17512357)
> 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] by dragonwriter on Wednesday July 11, 2018 @06:53PM (#17510869)
> there's this fiction that an OOP+FP hybrid will be loved by both OOP and FP programmers

That seems more of a strawman than a fiction: I've never seen anyone, especially in the Scala community, suggest this.

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.

Re:The Last Hope for Scala's Infinity War [video] by joefkelley on Wednesday July 11, 2018 @08:28PM (#17511327)
> 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 functional stuff, I'm left wondering why I still have the OOP stuff, and why some of the FP stuff isn't more natural. I guess you still need some OOP for java interop, but the pure-scala ecosystem is pretty significant already.

I guess what I'm saying is that the easy transition from Java is only a benefit for bringing people in, not for a language as a mature ecosystem. And I'm thinking maybe I should get into one of the full-FP languages.

In fact, if anything, what's keeping me from making the switch is not any OOP features, but actually just imperative! Especially for performance-sensitive sections, and some rare-but-necessary data structures, it seems you really do want a small amount of mutable state.

Re:The Last Hope for Scala's Infinity War [video] by vorg on Wednesday July 11, 2018 @08:52PM (#17511419)
> 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 Haskell and the like.

I only spent a few months on Scala way back so don't know for sure, but I did see Apache Groovy go through a similar business re-purposing. It began as a JVM-based scripting language complementing Java, useful for glue code and testing, but later became a competitor to Java and other statically-compiled JVM languages, and even tried unsuccessfully to target Android.

Re:The Last Hope for Scala's Infinity War [video] by zmmmmm on Wednesday July 11, 2018 @10:48PM (#17511819)
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] by lmm on Thursday July 12, 2018 @09:57AM (#17514596)
> 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.

Take it slow, and don't expect to be using every Scala feature/library/pattern from day 1 - there is a lot of depth to functional idioms, the learning curve of something like Haskell has less to do with syntax than you might think. Write code that does things that are useful to you - even if you're only writing "Java without semicolons", you're getting value out of Scala - and adopt the fancier features one step at a time. I've been working in Scala for 8 years and there are still places I'd fear to tread (why do I care if my profunctor has strength?), but every year I've produced more concise, clearer, less buggy code than the year before, and even in year 1 I was doing as good as I had been in Java or Groovy.

Re:The Last Hope for Scala's Infinity War [video] by the_af on Wednesday July 11, 2018 @07:18PM (#17510999)
Well, "love" is obviously an extreme, but I think I know what DeGoes means. I know I've cursed at Scala's Java/OOP heritage more than once. I've also puzzled over the related issue of how complex some of Scala's function signatures are (or used to be; I know there's work on this) compared to equivalent Haskell functions.

It seems to me DeGoes is arguing that Scala's "key value proposition" is a losing battle, because other languages are starting to do it much better. It's likely that the "practical programmer" will go with Kotlin or even the next iterations of Java, and the rest... well, you can guess the reaction of the audience to his question ("how many of you would work with Haskell if you could?"), and I must take his assertion at face value that in Scala conferences, the more popular talks are about FP, not about OOP or even FP+OOP. Maybe he's wrong about this, of course.

Again, I'm saying all this as a Scala practitioner. I'm not leaving it for Kotlin either. Then again, I certainly would work with Haskell if I could!

edit: one more thing:

> "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"

In my experience, this ramping up to FP happens in one of two ways with Scala:

- Completely ad hoc, misunderstanding every principle and making a Frankenstein's monster out of it. No lessons learned, just a mess that "works".

- Understanding it and doing it with care, and mentioning Haskell a lot (as these people start to read articles and watch tech talks on FP).

This is entirely my personal experience and probably won't generalize to every workplace.

Re:The Last Hope for Scala's Infinity War [video] by shmish111 on Wednesday July 11, 2018 @07:26PM (#17511044)
Why can't you work in Haskell?
Re:The Last Hope for Scala's Infinity War [video] by the_af on Wednesday July 11, 2018 @07:32PM (#17511070)
There aren't many Haskell jobs where I live, I don't want to move, and it's unfeasible to suggest it at my (otherwise decent) job.
Re:The Last Hope for Scala's Infinity War [video] by shmish111 on Thursday July 12, 2018 @04:39AM (#17513052)
Ok, I just want people to not think there are no Haskell jobs out there. The only reason not to be able to get one is if you don't want move and can't find something remote (although there are a few remote jobs around). There are otherwise plenty of Haskell jobs for those that are looking and sometimes in unusual places such as Alaska!