Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Paavo Helde Newsgroups: comp.lang.c++,comp.lang.c Subject: Re: Threads across programming languages Date: Sun, 5 May 2024 10:38:31 +0300 Organization: A noiseless patient Spider Lines: 30 Message-ID: References: <20240503180102.00002f98@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 05 May 2024 09:38:31 +0200 (CEST) Injection-Info: dont-email.me; posting-host="c7d1452d6ab0850f7ed8579b647dcd57"; logging-data="1839035"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ndWvxXVQhq4B9xXXCuClG0vz4M2seJ1s=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:jPKtJXxjJwKsLC06HuyjeaazVdc= Content-Language: en-US In-Reply-To: Bytes: 3222 On 05.05.2024 04:41, Lawrence D'Oliveiro wrote: > On Sat, 4 May 2024 20:41:42 +0300, Paavo Helde wrote: > >> 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. > > Interesting, isn’t it? You mention all the complications of C++, and how > it doesn’t need yet more complications tacked on top to support something > as simple as lexical binding. Yet Pascal had lexical binding from the get- > go, and managed it in a much simpler way. A programming language is a tool. The goal is not to have the tool which is simple to make. The goal is not even to have the tool which is simple to use. The goal is to have a tool which is adequate for its job.