News for hackers. Stuff that matters.
Re:Towards Scala 3 by MrBuddyCasino on Friday April 20, 2018 @09:08AM (#16884423)
Also, no plans to get rid of implicits apparently. Sorry Scala, we're not gonna be friends.
Re:Towards Scala 3 by pul on Friday April 20, 2018 @09:15AM (#16884461)
Not fully, but implicit type conversion must be marked explicitly: https://medium.com/bigdatarepublic/key-takeaways-from-the-sc...
Re:Towards Scala 3 by modersky on Friday April 20, 2018 @10:00AM (#16884808)
Re:Towards Scala 3 by Cyph0n on Friday April 20, 2018 @09:24AM (#16884523)
Implicits are very powerful when used correctly, but are terrible if not.
Re:Towards Scala 3 by MrBuddyCasino on Friday April 20, 2018 @09:46AM (#16884694)
If "<feature> is very powerful when used correctly, but terrible if not": think long and hard before adding to a language.
Re:Towards Scala 3 by lmm on Friday April 20, 2018 @10:26AM (#16884997)
Completely agreed. Implicits are the one place where Scala genuinely pushes the art of language design a bit beyond what's really possible; I expect future languages to come up with a better solution to the same problem. But in the meantime the things they enable - typeclasses, extension methods, the magnet pattern - are too valuable to do without, and we can't just sit around and wait for the perfect language to arrive.

I wouldn't want to have any more language features that pushed as hard as implicits do, but one somewhat-experimental feature in a language is ok, just about. I don't think Scala is a thousand-year language, but it strikes the best balance given the current state of the art.

Re:Towards Scala 3 by yawaramin on Friday April 20, 2018 @11:08PM (#16889793)
Typeclasses: barely workable–if the implementor knows how to save the caller from paying the 'import tax'

Extension methods: too much potential for confusion

Magnet pattern: no idea what that is

Personally I feel OCaml strikes the best balance :-) But we may be arguing about an inch here rather than a mile.

Re:Towards Scala 3 by dionian on Saturday April 21, 2018 @11:11AM (#16891696)
which is why I'd be against adding them in Java and favor keeping the power in scala.
Re:Towards Scala 3 by YorkshireSeason on Friday April 20, 2018 @01:42PM (#16886829)
What is your main complaint with implicits?

If you don't like them, why don't you add "Use of implicits forbidden" to your coding style guidelines, and check in code-reviews, and add a "grep implicit" check to your CI setup that refuses to commit Scala code with implicits?

Let me paraphrase M. Odersky's PLDI 2017 keynote:

   The essence of Scala is implicits
You can find it at https://www.youtube.com/watch?v=br6035SKu-0
Re:Towards Scala 3 by philipwhiuk on Friday April 20, 2018 @06:17PM (#16888833)
> If you don't like them, why don't you add "Use of implicits forbidden" to your coding style guidelines, and check in code-reviews, and add a "grep implicit" check to your CI setup that refuses to commit Scala code with implicits?

Because Scala libraries that do useful stuff are infested with them. Akka loves the things.

> main complaint

They obscure complexity, pretending that complex stuff is simple. It makes simple stuff trivial but complex stuff harder.

Re:Towards Scala 3 by YorkshireSeason on Saturday April 21, 2018 @05:11AM (#16890644)
> Akka loves the things.

So? Treat Akka as a black box. You can always explicitly pass implicit arguments.

Re:Towards Scala 3 by MrBuddyCasino on Saturday April 21, 2018 @10:21AM (#16891512)
"If you don't like them, why don't you add "Use of implicits forbidden" to your coding style guidelines, and check in code-reviews, and add a "grep implicit" check to your CI setup that refuses to commit Scala code with implicits?"

Only someone who has never worked in a team before would suggest this.