Liste des Groupes | Revenir à cl c |
On 04.05.2024 01:20, Lawrence D'Oliveiro wrote:
>On Fri, 3 May 2024 18:01:02 +0300, Michael S wrote:C++ already has functions nested in namespaces, namespaces nested in
For C, I agree, mostly because C has no nested functions.
GCC implements nested functions in the C compiler. Though oddly, not in
C++.
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.
Les messages affichés proviennent d'usenet.