Live data from Hacker News

Towards Scala 3

scala-lang.org

291–300 of 383 posts

Re: Towards Scala 3

#291

Earlier quoted context omitted.

For what it's worth, this isn't just an evolution of the language, but a complete rewrite of the compiler. I appreciate that they're taking the time to do it right. They probably could've pushed new, non-trivial features out faster if they weren't doing a total rewrite.

This does nothing to change my opinion that total rewrites are almost always a horrible idea.

I've never seen a system or project that's had a "big" change that wasn't always a total rewrite.

I guess it's always envisioned differently like "can we tackle this subsystem in isolation".

Re: Towards Scala 3

#292
post #59

Earlier quoted context omitted.

So your biggest complaint is "Scala doesn't look like Python"? I mean, I love Python, but indentation-based syntax isn't that great. I think Scala is fine as it is.

Being brutally honest, compared to Haskell, ML and to a lesser extent Python, Scala's syntax is rather ugly and unnecessarily verbose. I'm almost certain its creators chose the syntax in order to tempt curly-bracket programmers, not because they liked it personally. I really hope that future high-level languages will use better syntax and move on from the C/C++ influence.

I don't think it's fair to refer to Scala's syntax non-specifically like that. Scala allows you to write code that looks like Java or code that looks closer to Haskell. It's a very wide spectrum.

You're probably referring to the worst of Scala.

Personally, I don't find expression-centric, brace-less Scala to be "rather ugly".

Re: Towards Scala 3

#293
post #180

Earlier quoted context omitted.

Being brutally honest, compared to Haskell, ML and to a lesser extent Python, Scala's syntax is rather ugly and unnecessarily verbose. I'm almost certain its creators chose the syntax in order to tempt curly-bracket programmers, not because they liked it personally. I really hope that future high-level languages will use better syntax and move on from the C/C++ influence.

> compared to Haskell, ML and to a lesser extent Python, Scala's syntax is rather ugly and unnecessarily verbose I have never worked extensively with Haskell or ML, but what I can say is that Scala's syntax is better than that of most other mainstream languages. Three of Scala's syntax niceties are: 1) No semicolons 2) No braces required for one-line functions 3) No constructor required: instance arguments passed in…

To add onto this, its not one line functions but rather functions whose body is a single expression.

You can do a big for comprehension, or a if/else, or a big chain of function calls, etc. without having to add brackets.

In practice you often end up not really using braces that often when writing FP style Scala.

Re: Towards Scala 3

#294

Last time I tried Scala I had to give up because I couldn't understand what a "trampoline" was, or how to use it to get multi-function tail recursion to work. Probably not Scala's fault.

What level of Scala were you trying? The things you're referring to don't sound pedestrian at all. You shouldn't let them turn you off from ALL of Scala.

Re: Towards Scala 3

#295
post #26

Earlier quoted context omitted.

I don't think many companies are betting on Scala anymore. F# is just as irrelevant in the grand scheme of things. Let's face it, Kotlin hurts Scala adoption.

Kotlin has many benefits that Scala has in terms of “being a better Java” without sacrificing the readability and usability benefits of Java itself. Scala is a fantastic language, but it’s not one your average Java developer can pick up in a day or two.

What readability and usability benefits are you claiming Java to have?

Re: Towards Scala 3

#296

Earlier quoted context omitted.

> Implicits are a generalisation of default arguments. There is an extreme semantic difference between an implicit parameter and a default argument. Have you spent any time at all using them? That's like claiming HKT is just a generalization of type constructors. Would you claim that HKT isn't anything new or novel because constructors have been around forever?

> Have you spent any time at all using them? Sure I have used both. Default arguments and implicits both have the same key idea: you can omit arguments to functions, and the compiler, guided by type information, synthesises the missing arguments during compilation. In order to understand the difference between both, it is crucial to realise that this compile-time synthesis of missing arguments has two related but dif…

> Default arguments and implicits both have the same key idea: you can omit arguments to functions, and the compiler, guided by type information, synthesises the missing arguments during compilation.

Saying implicits are a generalization of default arguments because they're both synthesized during compilation is like saying steam trains are a generalization of pipes because they're both made of metal. It elides too big a difference to be helpful, to the point that it's actually misleading.

Re: Towards Scala 3

#297
post #122

Disclaimer : I'm nobody important, but I do have an opinion If scala team were to disavow sbt, that'd be the single best thing they could possibly do for the ecosystem. I used to write a lot of scala, and working with sbt was enough to eventually get under my skin. I really like some of the OOP aspects of scala, the left-to-right style of thinking matches how my brain works. Scala having a lot to offer can distract n…

I don't think SBT is in any way officially endorsed in the first place? Many popular libraries use it, but there are plenty of other options. If you're not maintaining a public library that has to cross-build against multiple versions of Scala, IME there's no reason not to just use Maven, which gives you simple and well-documented builds.

Re: Towards Scala 3

#298
post #148

Earlier quoted context omitted.

The thing with Scala if you’ve come from OCaml is there’s no substitute for real Hindley-Milner, and the Scala object system isn’t good enough to compensate

Does anyone use Scala in cases where OCaml is a viable option? My impression has always been that Scala is "better than OCaml if you need the JVM"

I don't like having to give up full type inference, but it's much better than having to give up HKT.

Re: Towards Scala 3

#299

It's amazing how many people in this thread justify their own language choices by making negative, sweeping statements about another language (Scala in this case) that is successfully used by people other than themselves. Yes, some people who previously used Scala, now use Kotlin. And some people who would've used Scala if Kotlin didn't exist, use Kotlin. Same probably goes for Rust. But there is a big enough market…

No! Clojure is da best! jk...

Re: Towards Scala 3

#300
post #149
post #87

Earlier quoted context omitted.

Designing good multi-paradigm languages is very hard. I'm a big fan of Mozart-Oz and Common Lisp, and I think Odersky did a really good job with Scala. In fact, given that Common Lisp is languishing and Mozart was never a serious real world contender, Scala fills in a niche where there are not many competitors. C++, just for some use cases, Julia for others, and .NET. The fact that many organizations working on massi…

> Common Lisp is languishing can you elaborate more on that?

I don't think CL is attracting a lot of new developers or there's a lot of new libraries getting developed. But I would be glad to be proven wrong. Perhaps Racket will eventually become a CL replacement, now it's adopting a lot of Chez low-level stuff and it's multiparadigm efforts keep growing.
Post reply on HN