On Mar-12, Dan Sugalski wrote:At 9:49 AM +0100 3/12/04, Leopold Toetsch wrote: >Dan Sugalski wrote: > >>Calling a method: >> >> object.variable(pararms) > >Do we need the more explicit pcc_call syntax too: > > .pcc_begin > .arg x > .meth_call PObj, ("meth" | PMeth ) [, PReturnContinuation ] > .result r > .pcc_end
Sure. Or we could make it:
.pcc_begin .arg x .object y .meth_call "foo" .result r .pcc_end
to make things simpler.
I vote yes -- until we add AST input to imcc, making the args and invocant be line-oriented makes code generation easier for the Perl6 compiler, at least. (Although I might do it the 1st way anyway, just because I spend so much time staring at generated code.)
But I had to stare at the ".object" for a second before I realized you weren't just giving the type of another arg -- would it be better to use ".invocant"?
I don't care either way. Invocant isn't bad as you can do this with non-object things, so object's not quite right. (Though arguably anything you make a method call on really is an object :)
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk