Deutsch   English   Français   Italiano  
<1035kov$u2kk$1@dont-email.me>

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

Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Mark Summerfield <m.n.summerfield@gmail.com>
Newsgroups: comp.lang.tcl
Subject: Re: Are class consts possible?
Date: Sat, 21 Jun 2025 06:51:11 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <1035kov$u2kk$1@dont-email.me>
References: <10334bd$l3lq$1@dont-email.me> <1033nld$1qj6$1@dont-email.me>
	<1034dnv$7fls$1@dont-email.me> <1034g98$82fd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 21 Jun 2025 08:51:11 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="938eb122d16bec54dbc3a7804eb46e50";
	logging-data="985748"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+TcfXX6mRBk6mtAf2qB9SC"
User-Agent: Pan/0.149 (Bellevue; 4c157ba)
Cancel-Lock: sha1:JDXGF6ypWH2KRxkS3U/9Mi8nslY=

On Fri, 20 Jun 2025 20:28:25 -0000 (UTC), Rich wrote:

> Mark Summerfield <m.n.summerfield@gmail.com> wrote:
>> On Fri, 20 Jun 2025 13:28:13 -0000 (UTC), Rich wrote:
>> 
>>> Mark Summerfield <m.n.summerfield@gmail.com> wrote:
>>>> Is it possible to create class-specific consts i.e., consts that
>>>> exist inside a class's namespace?
>>>> 
>>>> 
>>> Tcl does not have "constants" in the vien of other languages
>>> "constants".
>>> 
>>> However, there are several ways to "roll your own":
>>> https://wiki.tcl-lang.org/page/constants
>> 
>> According to https://www.tcl-lang.org/man/tcl9.0/TclCmd/const.html
>> "const — create and initialize a constant"
>> 
>> And I use them quite a lot since I'm using Tcl 9.
> 
> Ah, it seems Tcl 9 added "const" capabilities.
> 
>> Perhaps the wiki needs updating?
> 
> Indeed, that would seem to be the case.

I've updated the web page https://wiki.tcl-lang.org/page/constants 
accordingly.