From abu@user13892@newsgrouper.org.invalid to comp.lang.tcl on Tue Jan 27 22:56:32 2026
From Newsgroup: comp.lang.tcl
I've read various articles and comments on how to implement class-methods
and class-variables in Tcloo, but I've never figured out how to implement
a class-constructor (similar to Snit's typeconstructor)
to initialize these class-variables.
Please, can you give me some simple examples ?
--- Synchronet 3.21b-Linux NewsLink 1.2
From Emiliano@emiliano@example.invalid to comp.lang.tcl on Tue Jan 27 22:50:43 2026
I've read various articles and comments on how to implement class-methods
and class-variables in Tcloo, but I've never figured out how to implement
a class-constructor (similar to Snit's typeconstructor)
to initialize these class-variables.
Please, can you give me some simple examples ?
There is a simple example in the documentation of classvariable(n):
From abu@user13892@newsgrouper.org.invalid to comp.lang.tcl on Wed Jan 28 23:42:35 2026
From Newsgroup: comp.lang.tcl
That's simply good !
I never considered these new Tcl9.x features, since I always tried to deliver code running for Tcl8.x and Tcl9.x.
After seeing how it works for Tcl9, I think I'll abandon full Tcl8.x compatibility, because trying to implement classmethods and classvariables with Tcl8.x is simply impossible, unless you resort to very complicated tricks
, with many limitations.