News for hackers. Stuff that matters.
Re:Towards Scala 3 by lptk on Saturday April 21, 2018 @10:09AM (#16891476)
Your example of nested functions with default arguments does not correspond to what derived implicits do. As a result of implicit resolution, an expression with an arbitrary number of subexpressions may be synthesized, the shape of which depends on the types involves. Default parameters simply cannot do that.

The example you give to justify "recursion is quite restricted" is not a restriction on recursion at all, it's an ambiguity problem. Define `a` as `y` to shadow the function parameter, and it compiles.

Re:Towards Scala 3 by YorkshireSeason on Saturday April 21, 2018 @10:37AM (#16891568)
> does not correspond to what derived implicits do

I did not claim it did. The first example disproved ionforce's claim that default values cannot be constructed dynamically.

> Define `a` as `y` to shadow the function parameter,

Whoops, yes that's correct. I didn't realise this was possible.

Re:Towards Scala 3 by lptk on Saturday April 21, 2018 @10:58AM (#16891641)
> The first example disproved ionforce's claim that default values cannot be constructed dynamically.

But I don't think that is what they meant. I think they meant something along the lines of what I said above:

> an expression with an arbitrary number of subexpressions may be synthesized, the shape of which depends on the types involves

Re:Towards Scala 3 by YorkshireSeason on Wednesday April 25, 2018 @06:08AM (#16920097)
OK, maybe I misunderstood ionforce. I don't deny that type-driven synthesis is a core element of implicits.