Deutsch   English   Français   Italiano  
<vngjhp$336nb$1@dont-email.me>

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

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: aotto1968 <aotto1968@t-online.de>
Newsgroups: comp.lang.tcl
Subject: Re: OK, what looks better. The OLD tcl-oo or the NEW tcl-oo?
Date: Thu, 30 Jan 2025 20:22:33 +0100
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <vngjhp$336nb$1@dont-email.me>
References: <vlqmit$3tm2o$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 30 Jan 2025 20:22:33 +0100 (CET)
Injection-Info: dont-email.me; posting-host="af6c6e47e486a747eb1bba25d8a14bb6";
	logging-data="3250923"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/w2oKcdukxVQaL2BxbaDPukfFc2lC5aHs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:tHAuGHPfRQ0f2N4xCaFu4EtLJN0=
In-Reply-To: <vlqmit$3tm2o$1@dont-email.me>
Content-Language: en-US
Bytes: 2265

Array versa Namespace
=====================

‍I struggled with whether myoo should be array-reference-based or namespace-reference-based.

After doing some research with the tclmyoo TCL-API and libmyoo C-API I switch to namespace-reference-based

The following reasons led to the switch to namespace-reference :

- With TclGetNamespaceFromObj from the tcl internal Int API, a very powerful tool is available for resolving a namespace.
- It has been confirmed that "namespace upvar NS my my" is significantly faster than "upvar NS::my my".
- To call a sub-method, the local-reference no longer needs to be resolved because the instance-namespace is always used
   for the global namespace (::).
- An external-pointer can also be attached to the tcl internal Tcl_Namespace* pointer, which speeds up the
   All-Language-Compiler (ALC) compiler massively.
- The code becomes much smaller and simpler by switching to the namespace-reference, so that I can proudly say that myoo is
   by far the smallest Object-Oriented-Programming (OOP) in the world.
- Even with the tcl-only version, tclmyoo is faster than tcloo with over ten years of development work.

read more at: http://thedev.nhi1.de/theLib/main/index.htm