Dan Sugalski <[EMAIL PROTECTED]> wrote:
> Time to nail down some method syntax for IMCC. So, what I'd like (and
> this is open to discussion) is:

> Calling a method:

>     object.variable(pararms)

Ok.

>     object."literal name"(params)

A currently already implemented variant is:

   object.label(params)

where label is an unquoted string. I'll do the other two variants
tomorrow, if they aren't done - seems simple now:)

> Method declarations:

>     .pcc_sub foo prototyped, method
>        .param pmc foo
>        .param pmc bar

>     .end

> That is, you add a method on the end of the sub declaration line. If
> you do so, the local self refers to the object pmc register. (I am OK
> with unconditionally doing this, in which case we should define some
> other guaranteed aliases)

alternative syntax:

  .self me   # declare PMC P2 as var me

so

  .pcc_sub foo prototyped, method

is

  .pcc_sub foo prototyped
  ...
  .self self

which is actually

  .local pmc self
  self := P2

leo

Reply via email to