Deutsch English Français Italiano |
<vejkm2$19kb8$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: et99 <et99@rocketship1.me> Newsgroups: comp.lang.tcl Subject: Re: tcl hidden "cruelties" Date: Mon, 14 Oct 2024 10:33:54 -0700 Organization: A noiseless patient Spider Lines: 28 Message-ID: <vejkm2$19kb8$1@dont-email.me> References: <ve89ok$345h7$1@dont-email.me> <veht1v$t9io$1@dont-email.me> <veihug$13uq8$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 14 Oct 2024 19:33:54 +0200 (CEST) Injection-Info: dont-email.me; posting-host="a6d18d01de1ce3bb5fc6c59a2e2fafcd"; logging-data="1364328"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yfZtJ5qhcErxiNNx9htQo" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:wZO0xirqGM2MtwTAL6Y7MHhcZIo= Content-Language: en-US In-Reply-To: <veihug$13uq8$1@dont-email.me> Bytes: 2466 On 10/14/2024 12:41 AM, aotto1968 wrote: > > 1) but the CORE problem is not solved, for every "namespace ns-set ..." command TWO commands > are executed just to avoid FIRST namespace missing error. > → (ALL pay runtime-speed just for FIRST benefit) > > 2) the syntax to extend an existing ensemble is still very "ugly.." > > improvement: > > 1. namespace ensemble add array ns-set ::array-ns-set > > 2. namespace ensemble delete array ns-set If you have a proposal to improve the TCL language then the TIP mechanism is the approach to take. However, IMHO, namespace commands, especially ones that create namespaces should be done with the [namespace] command. It would be helpful to be able to grep for "namespace" to find all the relevant commands. Having an exception, where some other command also can create a namespace seems quite odd to me and could cause some confusion for someone other than the author trying to understand or maintain a TCL program. As to performance, I doubt that a command very likely done but once in a program will cause any issues in that regard. That said, I wouldn't mind seeing a command: namespace create name ?script? which seems to me to be an oversight. When I first looked into namespaces, I found it odd that they were created with the eval option. At minimum, this would be a useful self documenting addition. -e