D isn't the only language with janky closure semantics

H. S. Teoh hsteoh at qfbox.info
Sat Aug 30 18:43:49 UTC 2025


On Sat, Aug 30, 2025 at 05:20:18PM +0000, Konstantin via Digitalmars-d wrote:
> Why are delegates in D an aggregate of a context pointer and a
> function pointer, not like C++'s lambdas (anonymous class with
> `operator()`)?

That's just an implementation issue.  I think the original intention is
to unify them with class member function pointers, or something like
that.


T

-- 
I am not superstitious; I'm just a little stitious.


More information about the Digitalmars-d mailing list