Proposing std.typecons : Optional (with PR)

aliak something at something.com
Wed Jun 12 11:56:57 UTC 2019


On Wednesday, 12 June 2019 at 10:52:22 UTC, FeepingCreature wrote:
> On Wednesday, 12 June 2019 at 09:53:03 UTC, Jacob Carlborg 
> wrote:
>> On 2019-06-11 15:55, FeepingCreature wrote:
>>
>>> We have "map for Optional/Nullable", that's `apply`.
>>
>> And the rest of the algorithms?
>
> As the saying goes, "PRs welcome." Personally I get along fine 
> without them, so I didn't see the need to include them. For 
> instance, we have a local orElse implementation hanging around. 
> The point of having `Optional` in the stdlib is that the rest 
> of the ecosystem can standardize around the data structure. 
> There is none such need for algorithms, especially oneliners.

These algorithms are already there if it's implemented as a 
range. There's no need to reimplement them.


More information about the Digitalmars-d mailing list