Discussion Thread: DIP 1033--Implicit Conversion of Expressions to Delegates--Final Review
FeepingCreature
feepingcreature at gmail.com
Tue Nov 24 09:47:33 UTC 2020
On Friday, 20 November 2020 at 07:29:21 UTC, Mike Parker wrote:
> This is the discussion thread for the Final Review of DIP 1033,
> "Implicit Conversion of Expressions to Delegates":
>
> https://github.com/dlang/DIPs/blob/8e56fc593ece5c74f18b8eb68c3f9dcedf2396a7/DIPs/DIP1033.md
>
Does DIP1033, or rather, a post-DIP1033 language, offer any hope
for https://issues.dlang.org/show_bug.cgi?id=21420 ? Tl;dr: the
default parameter to Nullable.get() cannot be lazy because if it
were lazy, Nullable.get() could neither infer nor carry any sort
of nothrow or @safe annotation, making it unusable from
@safe/nothrow code.
Could DIP1033 offer something like ...
inout(T) get(DG : inout(T) delegate())(DG fallback) pure { ... }
Where DG would carry callsite inference about nothrow and @safe
ness of the converted expression?
More information about the Digitalmars-d
mailing list