Hi Chris... I finally had some time to address the points you made in
you reply.

Chris Warburton <[email protected]> writes:

> If I understand correctly then there's the potential for ambiguities
> to arise if we differentiate WRT 2 different objects, and we're
> calling the same method on both.

Actually, there isn't.  The 'bind' operator takes a closure as its first
argument, and generates a new closure where the specified formal
parameter (named by the second argument) is bound to the value in the
third argument:

NewMethod = bind(OldMethod, 'OldMethodArgN', Value);

The 'explicit' operator is also unambiguous.  It takes a binding from
the closure's lexical environment and turns it into an explicit
argument:

NewClosure = explicit(OldClosure, 'OldClosureLexVar');

I'm changing my mind on things here: the NewClosure should always take
the old lexical variable as the first argument (not as the explicitly
named N in Nth argument).  If a different ordering is needed, the caller
can construct a wrapper method for it.

> As for the other direction, I've personally been thinking about a similar 
> method of automatically abstracting functions. Rather than injecting new 
> arguments, we generate a separate, more generic function from which we can 
> reconstruct the original function by specifying the arguments.

I think this would be a lot harder to use in practice without a lot of
reflective capabilities.  How would we anticipate the number or types of
the arguments?

> I think the parallels with your notion of more-implied = derivative and more-
> explicit = antiderivative is interesting, and would value people's thoughts.

Me too!

Thanks a lot for writing back, this is indeed interesting to me,

-- 
Michael FIG <[email protected]> //\
   http://michael.fig.org/    \//

_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc

Reply via email to