On Wed, Sep 27, 2006 at 11:38:10AM +0200, Leopold Toetsch wrote: > Am Mittwoch, 27. September 2006 09:12 schrieb Allison Randal: > > > The basic problem is inconsistency. For hand-written code the current > > PIR method call syntactic sugar is mildly annoying. (It'd be nice to > > safely get rid of the quotes around the method name.) > > Not easily: > > obj.'foo'() # a methodname constant > .local string bar > bar = get_some_meth() # or bar = 'get_some_meth'() > obj.bar() # a method variable > > But: > > obj.foo() # still a methodname constant > # unless there's a variable 'foo' > > To be on the safe side, method (and function) names *should* be quoted. I > don't think that this is inconsistent.
Is there a reason that you would want to conflate method names and variables used as a method name? If not, why not change the syntax slightly so that method names in a variable are uniquely identified? Here's a suggestion: obj.foo() # a methodname constant .local string bar bar = get_some_meth() obj.$bar() # a method variable The same could be used for ordinary subroutines: .local string mysub mysub = "foo" $mysub() # calls the foo subroutine -Scott -- Jonathan Scott Duff <[EMAIL PROTECTED]>