Duby dynamic dispatch has landed!
Charles Oliver Nutter
headius at headius.com
Thu Mar 25 10:13:05 PDT 2010
On Thu, Mar 25, 2010 at 10:12 AM, Rémi Forax <forax at univ-mlv.fr> wrote:
> I've also found useful to propagate expected type back to the calling
> method.
> Example:
> if (foo()) { ... }
>
> should be translated to indy foo ()Z instead of ()Object because if ()
> wait for a boolean.
Yeah, I suppose this is appropriate for any "call" that is seen to be
receiving a dynamic type, i.e.:
def foo(a:List, b:dynamic)
a.get(b.size) # size should be indy size()I
I'll have to see what I'd need to do in Duby's type engine to have
"upstream" type requirements influence "downstream" inferred types.
- Charlie
More information about the mlvm-dev
mailing list