Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That doesn’t follow. Scala is a high level language and compiler above the JVM. The bug here is a high level one:

> Turns out there was indeed a subtle bug making chained evaluations inefficient in Scala 3

I’m comparing with Haskell, Scheme, or even SQl which all promise to compile efficient code from high level descriptions.





The bug in TFA is hardly a reason that Scala is not a success, though.

I didn’t say that. I’m highlighting a specific challenge of getting predictable performance over the lifetime of code.

Lower-level languages don’t have this same problem to the same extent. They have other problems Scala doesn’t have.


> Lower-level languages don’t have this same problem to the same extent.

Of course they have.

If the computer would directly execute what you write down in what you call "low level language" this would be slow as fuck.

Without highly optimizing compilers even stuff like C runs pretty slow.

If something about the optimizer or some other translation step of a compiler changes this has often significant influence on the performance of the resulting compilation artifacts.


They absolutely do not. The problem is three-fold.

1. The rules for when an optimization works and doesn't is complex and implicit (as seen in this post).

2. The magnitude of performance between getting an optimization and not is significant.

3. When it does fail, you have almost no recourse because you can't express your intent.

Now do C. You have problem 1, but not to the same extent. In rare cases you can see problem 2. And you never have problem 3.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: