[jhc] Classes

John Meacham john at repetae.net
Tue Mar 11 22:13:27 EDT 2008


On Tue, Mar 11, 2008 at 08:17:43AM -0400, Samuel Bronson wrote:
> On Mon, Mar 10, 2008 at 9:32 PM, John Meacham <john at repetae.net> wrote:
> > On Mon, Mar 10, 2008 at 08:27:20PM -0400, Samuel Bronson wrote:
> >  > Eh? Won't that generate the same name as before? Or were you thinking
> >  > it would just combine the alias' name with local component of the
> >  > method name -- which won't work if the alias expands to classes which
> >  > have methods of the same name. Which COULD happen, and should work.
> >
> >  Ah, yeah you should probably include the class alias name in there. as
> >  in something like
> >
> >  ClassAlias at .[Module].[AliasName].[method]
> 
> But how to tell where the alias name ends and the method name begins?
> The method name will need to be qualified, won't it?

You may need to do something like that.

In any case you should never parse existing names to pull out the info
about it, you should just call 'classAliasDefaultName alias method' and
use the result. As in, I never need to look at a name to find out it is
an instance, I Just know that the result of 'instanceName' will be a
valid existing name of the right type so I can refer to it directly.

The actual format of the name would never occur anywhere in code other
than the 'classAliasDefaultName' function so it would be pretty easy to
change later in any case.

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the jhc mailing list