Re: A TclOO question (for experts?)

Liste des GroupesRevenir à cl tcl 
Sujet : Re: A TclOO question (for experts?)
De : ralfixx (at) *nospam* gmx.de (Ralf Fassel)
Groupes : comp.lang.tcl
Date : 14. Apr 2025, 10:08:05
Autres entêtes
Message-ID : <ygawmbndsay.fsf@akutech.de>
References : 1 2 3
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
* Helmut Giese <hgiese@ratiosoft.com>
| | → https://x.com/i/grok/share/Wo4XKUycnscf3WNTbpMoms93f
| that's really cool: a complete, detailed analysis which even I
| understood. Many thanks for this link

The text created by the AI contains a subtle error: it makes a
difference between "variable foo" at class level and "my variable foo"
at method level as the former being a "class-wide" variable (shared
across instances, 'static' in C++, 'common' in itcl) and the latter
"instance-specific" ones (specific to one object):

    [Complex situations, p2]
    ...
    ["my variable classVar" in method without previous "variable classVar" at class level]
    ...
    In this case, classVar becomes an instance-specific variable, not a
    class-wide one, which could lead to unexpected behavior if the
    intent was to share classVar across instances.

As far as I understand it, this is not the case.  Also the code you
posted cleary shows that classVar is *not* shared between instances
(each object has it's own value).

Maybe someone with more knowlegde on this can share some insight?

R'

Date Sujet#  Auteur
7 Apr 25 * A TclOO question (for experts?)8Helmut Giese
8 Apr 25 +* Re: A TclOO question (for experts?)2rene
9 Apr 25 i`- Re: A TclOO question (for experts?)1Helmut Giese
11 Apr 25 `* Re: A TclOO question (for experts?)5aotto1968
11 Apr 25  `* Re: A TclOO question (for experts?)4Helmut Giese
14 Apr 25   `* Re: A TclOO question (for experts?)3Ralf Fassel
14 Apr 25    `* Re: A TclOO question (for experts?)2abu
14 Apr 25     `- Re: A TclOO question (for experts?)1Ashok

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal