Subject: Re: Claiming top level namespaces - DN [1]
Jeffrey Hobbs <jeffrey.hobbs@scriptics.com> - 01 Feb 2000 - comp.lang.tcl
Don Porter wrote: > From today's NetCVS update on the Tcl core: > date: 2000/02/01 01:14:01; author: ericm; > * library/package.tcl: Added ::package namespace and > ::package::create function. > > Isn't it time we set out some guidelines determining how many > top level namespaces Scriptics is going to claim for the Tcl core? > They're already making use of ::auto_mkindex_parser, ::tcl, ::safe, > ::http, ::msgcat, ::tcltest, ::tk and ::tkChooseDirectory. Some of > these are actually packages, so use of a top-level namespace may make > sense for them. (Although, ultimately I would consider them not > part of the core, but part of the standard library bundled with the > core). However, can't the rest all be grouped as child namespaces > of ::tcl or ::tk ? Let's replace "Scriptics" with "the core group", and my argument bends quite a bit more favorably. My job, first and foremost, is to maintain and enhance the open source core that everybody uses, not add features for Scriptics' benefit alone. This doesn't preclude the point that guidelines must be maintained for what the core writers should feel free to do, and what Tcl users can expect of Tcl now and in the future. The ::package command in particular will be the new namespace that will host all helper functions for the future net-aware package mechanism. We are starting small for 8.3.0 by just creating it, and adding some low-level stuff for making package files that users might also like to use. After the 8.3.0 release, we are going to want to start pushing a standard Tcl library, so we also have to determine in what way these should be named. ::stdtcl::base64 or ::base64 ? ::stdtcl::ftp or ::ftp? Remember that's just the namespace name, the commands have to get typed in too. We are leaning towards the latter, flatter structure, so users would get used to ::base64::encode and ::ftp::connect. We want to discourage the use of importing commands from a namespace in general. Voice your opinions now, because these decisions are all being made RSN. This will probably be discussed in length at Tcl2K. > Also, why does the package "Tcl" use the namespace "tcl" and the > package "Tk" use the namespace "tk"? Does the case inconsistency > serve any purpose? It saves you from having to hit the shift key when typing in the namespace name... Personally, I like the idea of lower case namespace names (where only one "word" is involved), although I know that the style guide says otherwise. -- Jeffrey Hobbs The Tcl Guy jeffrey.hobbs at scriptics.com Scriptics Corp.
Last modified
2000-02-10
2000-02-10
(195.108.246.50)
Note: you are looking at
the snapshot of an old wiki
- much of this information
is likely to be very outdated
