Sujet : Re: Threads across programming languages
De : eesnimi (at) *nospam* osa.pri.ee (Paavo Helde)
Groupes : comp.lang.c++ comp.lang.cDate : 04. May 2024, 19:41:42
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v15s0l$1al59$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
User-Agent : Mozilla Thunderbird
On 04.05.2024 01:20, Lawrence D'Oliveiro wrote:
On Fri, 3 May 2024 18:01:02 +0300, Michael S wrote:
For C, I agree, mostly because C has no nested functions.
GCC implements nested functions in the C compiler. Though oddly, not in C+
+.
C++ already has functions nested in namespaces, namespaces nested in namespaces, functions nested in classes (static and non-static member functions), and classes nested in classes. It's already a lot of nesting, no need to complicate the matters more.
In Pascal, function nesting is used for better encapsulation of data. In C++, the same is achieved in a cleaner and more explicit way via classes and member functions, so no need for this kind of nesting.