Google Groups Home
Help | Sign in
Message from discussion Support for glob patterns in various commands (Was: Re: Tcl/Tk 8.5.2 RELEASED)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
vit...@gmail.com  
View profile
 More options Mar 31, 8:02 pm
Newsgroups: comp.lang.tcl
From: vit...@gmail.com
Date: Mon, 31 Mar 2008 17:02:43 -0700 (PDT)
Local: Mon, Mar 31 2008 8:02 pm
Subject: Re: Support for glob patterns in various commands (Was: Re: Tcl/Tk 8.5.2 RELEASED)
On Mar 31, 2:35 pm, Neil Madden <n...@cs.nott.ac.uk> wrote:

> vit...@gmail.com wrote:
> > Thanks a lot, nice to see TCL development moving along.

> > Question for everyone involved or whoever cares to answer:

> > Is it possible/desirable to extend TCL core to add more functionality
> > to make the environment more transparent?

> It is certainly possible to implement these things right now in pure Tcl
> script. No need to extend the core.

> > Example:
> > ----------------------------------------------------
> > I have these namespaces: x::y1::z,x::y2::z, x::y3::x

> > If I want to see all commands in namespaces x::y1::z, x::y2::z,
> > x::y3::z
> > info commands x::*::z

> set cmds [list]
> foreach sub [namespace children x] {
>     lappend cmds {*}[info commands $sub\::z::*]

> }

> > In namespace x::y1::z
> > info commands x::*1::z

> Similar to the above.

> > Find all namespaces below x::
> > namespace children x::*

> This is just [namespace children x].

> > Find all namespaces below x::y1 and x::y2
> > namespace children x::y*

> ...and x::y3.

> > ----------------------------------------------------

> > Basically, add glob expansion to namespace and it's associated
> > commands (where it makes sense).  IMHO, that would make programming
> > with TCL much easier for a lot of people (including the humble
> > me) :) .

> I don't understand in what way this would make programming in Tcl
> easier. It seems slightly odd to be wanting to glob match against
> namespaces and commands in this way. What is it that you are trying to
> accomplish? Is this for debugging or for building some sort of IDE? If
> that is the case, then it seems that the solution is fairly simple already.

> -- Neil

See http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/a37...

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google