Artifacts Associated With Ticket 858a615194b96b1e
Ticket change [db75649bc5] (rid 246906) by mnsummerfield on 2025-10-08 09:23:33:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-plain"
- comment initialized to:
On page https://www.tcl-lang.org/man/tcl9.0/TclCmd/define.html if you search for 'classvariable' you will find an example that shows how to create a class variable. (1) There is no mention of classvariable on this page apart from the example. Surely there ought to be? (2) There is no mention that it is possible to create class constants. However, "Emiliano" shows that this can be done: https://comp.lang.tcl.narkive.com/RtoJyYzS/are-class-consts-possible#post7 Again, shouldn't this be documented?
- foundin initialized to: "9"
- is_private initialized to: "0"
- login: "mnsummerfield"
- priority initialized to: "5 Medium"
- private_contact initialized to: "852538396f016355a4575694e3e122b83db2bc48"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "mnsummerfield"
- subsystem initialized to: "10. Objects"
- title initialized to:
oo::define supports classvariable but this is not really documented
- type initialized to: "Bug"
Ticket change [d1bdf3527b] (rid 250327) by cdubois on 2026-01-12 03:55:53:
- icomment:
Thanks for the report. oo::define classvariable appears to be implemented and usable today, but it is missing from the formal command list on the oo::define manpage. I can put together a small doc patch to add it to the definitions section (with a short description alongside the other oo::define subcommands). On “class constants”: as far as I can tell TclOO does not provide a dedicated constant mechanism, so what people do here is an idiom. I suggest we first fix the clear documentation omission for classvariable, and then (if maintainers agree) add a brief note in the examples/notes clarifying the recommended pattern for read-only class-level values.
- login: "cdubois"
- mimetype: "text/plain"
- icomment: