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

One of the praised functions in Scala 2.8 was postfix operators, allowing things like:

    Seq(1, 2) map _ + 100
They are getting rid of it: https://contributors.scala-lang.org/t/lets-drop-postfix-oper...

Unit functions were a thing, just write:

    def A() { ... }
This is inalid since 2.13. You have to specify its a unit:

    def A(): Unit = { ... }

Most of the ideas in scala were to remove boilerplate, but they backfired. The top example had an issue, were the following conversion used to be made:

    z op ()
    // would equal to
    z.op()
    // instead of (fixed in 2.13)
    z.op(())
Arrows are used for creating key-value pairs and such. Someone added nice Unicode equivalents for them. Those got deprecated in 2.13

    Deprecated: ⇒, →, ←
    Use instead: =>, ->, <-
https://github.com/scala/scala/releases/tag/v2.13.0


They've also significantly simplified the collections classes, removing quite a bit of abstraction. That was always one of the things that struck me as most ludicrous about Scala, so i was pleasantly surprised by that.

Indeed, i've been impressed by the Scala team's recent willingness to remove complex features generally. I didn't see that coming.


I'm happy all of the things you list are going away.

The first one is unreadable. If I saw that in a pull request at work, I would ask the author to change it. (But I wouldn't have to; the people I work with know better.)

For the second, it's confusing to have two different ways to write the same thing; arguably you should always be writing type ascriptions for function return types (even though scalac doesn't require them) both for readability and avoiding bugs.

For the third, argument list adaptation is a great way to write bugs by accident and not notice. Good riddance.

The fourth is really a style thing, and a pretty weak one at that. I don't want random untypeable unicode characters in my code when ones I can type will do.


I was referring to the first sentence: "Most of the items explained are non-issues and part of why Golang is how it is today."

It's an objective fact they removed features in Scala (I think that's a good thing). But dismissing the pointed issues as non-issues without explanation is what rubbed me the wrong way.


Your first example is an infix operator, not a postfix operator. Further, postfix operators are not actually being removed (yet: this could change), they are just being put behind an explicit opt-in.




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

Search: