Am Donnerstag, 28. September 2006 21:42 schrieb Patrick R. Michaud:

I'm just quoting the relevant pieces here and add some comments below:

>     obj.'abc'()              # call 'abc' method of obj
>     obj.abc()                # always the same as above
>     obj.{abc}()              # call method indicated by abc symbol

This makes a lot of sense, and there are simple rules for the syntax:

* use {symbol}, if the thing isa symbol
* use 'name',  if the 'name' contains non-identifier characters
  (of if unsure, of if you are a compiler ;-)
* else you also might use bare word syntax

That should be it to deal with all that:

  obj.S0()     # emit warning but call 'S0' method

Rational: if bare <abc> isa identifier here, then C<S0> too.

  obj.$S0()    # illegal

leo

Reply via email to