[Swift-devel] Nasty multiparameter function hack.
Ben Clifford
benc at hawaga.org.uk
Wed Apr 25 09:53:01 CDT 2007
On Wed, 25 Apr 2007, Mihael Hategan wrote:
> On Wed, 2007-04-25 at 08:32 +0000, Ben Clifford wrote:
> > However, where the parameter is a variable:
> >
> > @f(x)
> >
> > this turned into a Karajan function call with two parameters, a 'variable'
> > and a 'path'. In the above case, the variable is x and the path is empty.
> >
> > In the case of @f(x.y) then the variable would be x and the path would be
> > y.
>
> That's kinda wrong:
> @f(x) should be f(getfield(x, path="")) which can be reduced to f(x) and
> @f(x.y) should be f(getfield(x, path="y")).
>
> Consequently:
> @strcat("x", x) -> strcat("x", x)
> @strcat("x", x.y) -> strcat("x", getfield(x, path="y"))
Does getfield still pass through enough info for something like
@filename(x.y) to work?
I haven't really done anything with getfield ever.
--
More information about the Swift-devel
mailing list