Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2022-05-30
16:24 • Closed ticket [443195ffff]: Export documented http::a-z* commands plus 4 o... artifact: e20dba4d2d user: kjnash
2022-05-13
03:00 • Pending ticket [443195ffff]. artifact: aae93afcfe user: kjnash
2022-05-12
01:39 • Ticket [443195ffff]: 3 changes artifact: 8df5d4adcd user: kjnash
2022-05-10
20:47 • Ticket [443195ffff]: 3 changes artifact: 5f283c608f user: kjnash
2013-11-12
14:52 • Ticket [443195ffff]: 7 changes artifact: ade66c2ec4 user: dkf
2001-11-21
01:55 • Ticket [443195ffff]: 4 changes artifact: 9ee7d5b8cb user: dgp
2001-11-20
17:04 • Ticket [443195ffff]: 4 changes artifact: bf9df3a34b user: hobbs
00:37 • Ticket [443195ffff]: 4 changes artifact: 0cc8e969fb user: dgp
2001-11-17
05:33 • Ticket [443195ffff]: 5 changes artifact: bb75f6124f user: hobbs
2001-11-08
02:34 • Ticket [443195ffff]: 1 change artifact: 151d9ab1dc user: andreas_kupries
02:29 • Ticket [443195ffff]: 1 change artifact: 388aa26762 user: andreas_kupries
2001-07-20
21:04 • New ticket [443195ffff]. artifact: d74dfd230f user: dgp

Export documented http::[a-z]* commands

Closed / Fixed443195ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 5 years ago
Descriptionplain2001-07-20 21:04:34
The commands

http::data
http::status
http::code
http::ncode
http::size
http::error
http::cleanup

are all documented, public commands of the
package http.  They should be added to the
[namespace export] list.

Also, the command

http::mapReply

has the form of a public command.  It should either
be documented and [namespace export]ed, or should
be changed to look like a private command.
andreas_kupries Ticket [443195ffff]: 1 change [History diff]2001-11-08 02:29:38
andreas_kupries Ticket [443195ffff]: 1 change [History diff]2001-11-08 02:34:48
hobbsplain2001-11-17 05:33:15
Logged In: YES 
user_id=72656

docs don't justify exporting.  For the above, the obvious 
conflict of 'error' shows the problems of exporting such 
simply named namespaced can't always be exported.
dgpplain2001-11-20 00:37:59
Logged In: YES 
user_id=80530

At the very least, if a public command is not
exported, then the inability to [namespace import]
that command must be documented.  The user of the
http package needs that documentation so he knows
not to attempt [namespace import ::http::error], etc.

I prefer a policy of always [namespace export]ing
all public commands of any package.  If you do not
[namespace export] a command, then users may not
[namespace import] and [rename] it to use it in
the way they choose within their own namespace.

It is true that a [namespace import ::http::error]
into :: would conflict with [::error], but it is
not necessarilly true that a conflict would exist
in any other namespace.  By refusing to 
[namespace export] these commands, you prevent their
import into *any* namespace, just becuase there will
be trouble importing into *one* namespace.
hobbsplain2001-11-20 17:04:02
Logged In: YES 
user_id=72656

I prefer the documentation route for this one, because the 
other one opens up backwards compatability problems 
(serious ones), where people already have [namespace 
import -force ::http::*], which is likely.
dgpplain2001-11-21 01:55:47
Logged In: YES 
user_id=80530

We disagree about what should be [namespace export]ed.
(Those who would have "compatbility problems" are getting
the trouble they asked for.  Promiscuous [namespace import]
should be discouraged!)

We agree this is a low priority matter, so no need to
continue the argument.

This discussion has reawakened some thoughts about
improvements to [namespace import] that, after TIPping,
could make everybody happy.  Stay tuned.

Meanwhile, improved documentatation will satisfy me.
dkf Ticket [443195ffff]: 7 changes [History diff]2013-11-12 14:52:12
kjnashplain2022-05-10 20:47:50
http::quoteString is an alias of http::mapReply that is both exported and documented.
kjnashwiki2022-05-12 01:39:12

Documentation http(n) changed to list the exported and non-exported commands. See commit [deb816791ea2deb8].

kjnash Pending ticket [443195ffff]. [History diff]2022-05-13 03:00:24
kjnash Closed ticket [443195ffff]. [History diff]2022-05-30 16:24:42
Log in (anonymous is fine) to add a comment.