[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [GT] alias resolution ... sub resolve_alias revisited



Attached is a patch against the repository which removes the need of
prefixing object aliases with "@". However, recursion in the expansion
of these aliases is not supported, as one cannot tell an alias
syntactically apart from an object definition. It is unlikely that
recursion is needed.

This code has the disadvantage of performing an additional hash table
lookup and a comparison for each object construction. This is the price
for the syntactic convenience. However, object construction does not
occur in tight loops, as far as I can tell, but just during script
initialization.

Th.

> -----Original Message-----
> From: Weigert, Thomas [mailto:weigert
AT
mst.edu]
> Sent: Friday, May 02, 2008 6:09 PM
> To: devel
AT
geniustrader.org
> Subject: RE: [GT] alias resolution ... sub resolve_alias revisited
> 
> 
> There is an awkwardness with aliases:
> - aliases standing for full system names are just used as is
> - object aliases (i.e., aliases for indicators, signals, etc., need to
>   Be prefixed with "@").
> 
> I'd like to see whether it is possible to drop that "@".

Attachment: object_alias.patch
Description: object_alias.patch