Sujet : Re: Threads across programming languages
De : Bonita.Montero (at) *nospam* gmail.com (Bonita Montero)
Groupes : comp.lang.c++ comp.lang.cDate : 02. May 2024, 17:10:47
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v10adm$3to7r$1@raubtier-asyl.eternal-september.org>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Mozilla Thunderbird
Am 02.05.2024 um 15:53 schrieb David Brown:
That is a /long/ way from treating functions as first-class objects.
A C-style function is also a function-object in C++ because it has
a calling operator.
But it is certainly a step in that direction, as are lambdas.
Lambdas can be assigned to function<>-object to make them runtime
-polymorphic. Otherwise they can be generic types, which are compile
-time polymorphic - like the function-object for std::sort();
You also claimed that classes are first-class objects in C++.
I never said that and having sth. like class Class in Java is
beyond C++'s performance constraints.