This page is no longer maintained — Please continue to the home page at

Fwd: first make it real, then make it useful

No replies
Alex Repain
Joined: 2010-07-27,
User offline. Last seen 1 year 31 weeks ago.
I agree with you martin, but it just seemed to me that PaulP pointed out the sweet spot he asked for, himself :).

One quick-think limitation of this : the annotation won't work on internal methods, since they can't be overloaded. I find myself using default arguments a lot for internal methods (for example, recursive components of a bigger algorithm). It's not that relevant for the existential type bonus it could provide, but still.

---------- Forwarded message ----------
From: martin odersky <martin [dot] odersky [at] epfl [dot] ch>
Date: 2012/2/13
Subject: Re: [scala-debate] first make it real, then make it useful
To: Alex Repain <alex [dot] repain [at] gmail [dot] com>

On Mon, Feb 13, 2012 at 12:14 PM, Alex Repain <alex [dot] repain [at] gmail [dot] com> wrote:
> 2012/2/13 Paul Phillips <paulp [at] improving [dot] org>
>> Is there a sweet spot where something like this would be useful but not
>> complicated? (Examples of complications I'm not real interested in:
>> parameters are not each a completely distinct type, or you invent a language
>> to communicate which expansions you want.)
> In which way do you find your own example complicated ? Seems to me it would
> work pretty well ...

The example is not complicated, but to put this in a language you need
to work out what the rules are in detail. When will it be allowed? How
does it interact with type parameters? existentials? What are
implications for overridding? What are the exact effects of the
transformation? If these rules turn out to be simple, the technique
could start to be interesting. Even though I don't really like
annotations that influence semantics. They do tend to open up
Pandora's box with uncontrolled language spread.

If we decide to go ahead with this, and macros materialize as well, we
should also think about the interactions between the two. Maybe this
can be done with a macro? To early to tell right now.


Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland