On Fri, 2003-02-28 at 08:43, Art Eschenlauer wrote:
> My experience with Unicon has been that, while function names are 
> full-fledged (Un)icon values, method names are not. This makes sense, in 
> a way, since a class has no existence till you instantiate it (I am 
> rationalizing after the fact here . . .).
> 
> Steve Wampler wrote:
> 
> >(Note that any non-call reference of a method name produces
> >similar errors:  replacing the 'add("help", help)' line
> >with just:
> >
> >   f := help
> >
> >generates an error, even if f isn't dereferenced elsewhere.)

Thanks, Art!

My personal take is that this is an artifact of the current
implementation wanting to layer on top of icont.  This has
the unfortunate effect of causing the error messages to be
unintelligable (to me, at least).

At some point Unicon may want to consider moving away from this
reliance on icon (it is using it's own copy, afterall!) and
start embedding more Unicon features into the underlying
implementation.

For example, to me it makes sense for a 'method' to be a
full-fledged type in Unicon (where one attribute of a method
is a reference to the instantiating class).  I *believe*
(wildly waving his hands to distract the audience) that this
would actually simplify some of the implementation - method
invocation would then be the same as procedure or function
invocation [i.e. handled by the same mechanism, which
(apparently - feel free to correct me!) isn't the case now.
When the invocation operation detects that it has a method,
it uses the link to the class to get the reference to self
that is then prepended to the argument list.  That allows
method 'values' to be treated just as other values are treated
elsewhere (assignments, etc.).

I've seen other parts of the language that would
benefit from breaking the underlying reliance on icon.
(For example, the fact that classes report themselves as 'record'
types, thus forcing the implementation up into the language...)

Anyway, food for thought if nothing else...
-- 
Steve Wampler <[EMAIL PROTECTED]>
National Solar Observatory


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to