Re:Carbon Language: An experimental successor to C++
by jstimpfle on Thursday July 21, 2022 @12:37PM
(#32181486)
Example of some well-written code that expresses things that can only be expressed in C++?
[ Parent
| on HN ]
Re:Carbon Language: An experimental successor to C++
by sk0g on Saturday July 23, 2022 @11:06PM
(#32209938)
I'm far from the most experienced in C++, but friend classes/functions do not seem to have a direct equivalent in any other language.
Re:Carbon Language: An experimental successor to C++
by int_19h on Monday July 25, 2022 @02:35PM
(#32228903)
In C#, nested classes are effectively friends with their outer class, and it's used quite often in practice.
On the other end of expressivity, in Eiffel, every class member is declared as visible to specific other classes; if you want something to be public, you say that it's visible to ANY, which is the universal base class similar to e.g. Object in Java.
Re:Carbon Language: An experimental successor to C++
by ncmncm on Thursday July 28, 2022 @12:24AM
(#32260471)
NB: Friend-this and -that are not among powerful features of C++.
Re:Carbon Language: An experimental successor to C++
by socialdemocrat on Tuesday July 26, 2022 @10:48AM
(#32239066)
Because you don’t need them in other languages.