ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tcl-core
tcl-core
Re: [TCLCORE] Pre-CFV: TIP#257
by Twylite other posts by this author
May 5 2008 3:56AM messages near this date
Re: [TCLCORE] Tcl-Core Digest, Vol 24, Issue 5 | Re: [TCLCORE] Pre-CFV: TIP#257
Hi,
>  Might be better to use a variable resolver. But that's deep voodoo (and
>  not something I understand fully either).
Mmm.  I once looked at how Tcl accomplishes variable and command 
resolution.  Had nightmares for weeks ;)  I had imagined that there 
would be a command-resolution-stack and a variable-resolution-stack, and 
entering a proc would push namespace information onto the 
command-resolution-stack and a local frame onto the 
variable-resolution-stack.  I imagined this while wondering if there 
might be a better way to implement "dict with".

Anyway I mention this because it strikes me as an interesting way to 
address a lot of resolution problems that are currently - I understand - 
handled in a variety of different ways and by different code, most of 
which fiddle with the frame's variable table.

> > Would it be worth considering an additional "meta" parameter to a 
> > method definition (before or afeter the argslist).  Such a parameter 
> > could be used in future to extend the functionality of methods 
> > without breaking the interface.
> > For example:
> >   - oo::define c method my_func {autovars true} {args} { ... }
> > In this case meta is treated as a dict, and TclOO knows about the 
> > "autovars" value which will cause the object's variables to be 
> > implicitly brought into scope (like import_object_vars above)
>  It might be better to think in terms of several modes of operation. So
>  you can have "none" (the current behaviour), "declarer" (only the vars
>  from the class declaring the method), "super" (the vars from the class
>  declaring the method and its superclasses) and "all" (all vars defined
>  on the object, including those from the subclasses of the class
>  declaring the method). There might be other modes too; those are just
>  the obvious thought of in about 10 seconds. :-)
Sounds good to me.  In my reading of the TclOO commands this morning I 
couldn't find any way to get a list of variables associated with a 
specific class (only all variables associated with an object) ...
- Is this something that can be done by the C internals?
- Could this be exposed by a "info class variables"?

Regards,
Trevor



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Tcl-Core mailing list
Tcl-Core@[...].net
https://lists.sourceforge.net/lists/listinfo/tcl-core
Thread:
Twylite
Will Duquette
Kevin Kenny
Kevin Kenny
Will Duquette
Arnulf Wiedemann
Will Duquette
Kevin Kenny
Donal K. Fellows
Twylite
Larry W. Virden
Twylite
Gustaf Neumann
Larry McVoy
Gerald W. Lester
Vasiljevic Zoran
Larry McVoy
Gerald W. Lester
Larry McVoy
Tomasz Kosiak
Gustaf Neumann
Donal K. Fellows
Daniel A. Steffen
Donal K. Fellows
Daniel A. Steffen
Donal K. Fellows
Donal K. Fellows
Daniel A. Steffen
Gerald W. Lester
Vasiljevic Zoran
Arnulf Wiedemann
Tom Krehbiel
Vasiljevic Zoran
Donal K. Fellows
Gustaf Neumann
Brian Griffin
Gustaf Neumann
Donal K. Fellows
Gustaf Neumann
Kristoffer Lawson
Daniel A. Steffen
Twylite
Donal K. Fellows
Will Duquette
Donal K. Fellows
Will Duquette
Arnulf Wiedemann
dgp
Donal K. Fellows
Arnulf Wiedemann
Twylite
Will Duquette
Twylite
Donal K. Fellows
Stefan Sobernig
Donal K. Fellows
Stefan Sobernig

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved