Deutsch   English   Français   Italiano  
<slrnv9eunt.1l9n7.avl@logic.at>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Andreas Leitgeb <avl@logic.at>
Newsgroups: comp.lang.tcl
Subject: Re: Differing namespace behavior in Tcl 9.0b2
Date: Wed, 17 Jul 2024 08:04:13 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <slrnv9eunt.1l9n7.avl@logic.at>
References: <v76q2g$1ej2c$1@dont-email.me>
Reply-To: avl@logic.at
Injection-Date: Wed, 17 Jul 2024 10:04:13 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="27f5daf1c0338e6034a2765519da7d32";
	logging-data="1841433"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+Q0bL3WOwzNwFDjvyfRzws"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:jnDVvPd+5Mt9/wo1VJKmcRdFP6w=
Bytes: 2263

Andrew Mangogna <amangogna@modelrealization.com> wrote:
> I have been out of the Tcl loop for a while, but have been porting an old 
> "C" based extension of mine to Tcl 9.0b2. The port went well, required 
> very few changes, but I have some differing behavior that I'm trying to 
> track down. The package consists of an ensemble command, "ral" which
> has three subcommands implemented in the "::ral" namespace. Each of
> the subcommands is also exported from the namespace. The following shows 
> the problems:

The behaviour looks buggy to me, but without knowing what 
your package ral really does, it's hard to judge.

The only commonly known change w.r.t. namespaces in Tcl9 is 
that change about variable lookup (already mentioned in other
replies).

Could you try to reproduce it with a simple package, that
exhibits the same difference 8.6 vs 9.0 ?

> % namespace export
> tuple relation relvar       <- unexpected -- ral exports these commands
>                             <- but they shouldn't appear in the global
>                             <- namespace

Maybe your code does an export on these commands, but only in Tcl9 it
effectively does the "export" from global namespace...

That *might* be a Tcl9 bug, but it would be very interesting how
that is triggered.

Btw., a command does not need to exist in a particular namespace to
be "export"-able from there.