Is there any news about issue 5710?
Steven Schveighoffer
schveiguy at gmail.com
Tue Sep 20 16:14:06 UTC 2022
On 9/20/22 12:04 PM, Vladimir Panteleev wrote:
> On Monday, 19 September 2022 at 16:27:21 UTC, victoroak wrote:
>> From what I understand the fix was reverted but looking at the github
>> discussion someone said they would take a look at how to do this but
>> it passed some time after that and no news about this issue. I hit
>> this issue the first day I tried D and it's sad to see that this is
>> still open.
>
> I think the issue is really that D and the standard library should not
> have invested so much into using context-ful aliases for predicates, as
> they're inherently limited. Functors (which can be stateful and/or
> context-ful) are just better (though the D syntax isn't as good).
>
> https://github.com/cybershadow/ae/blob/next/utils/pred/algorithm.d
>
I agree with this. Perhaps having versions of algorithms which don't use
aliases but rather functors would be a good addition?
It goes beyond just the dual-context problem. Functors don't need to
allocate closures.
-Steve
More information about the Digitalmars-d
mailing list