Discussion Thread: DIP 1033--Implicit Conversion of Expressions to Delegates--Community Review Round 1

Steven Schveighoffer schveiguy at gmail.com
Wed Apr 22 17:13:38 UTC 2020


On 4/22/20 12:50 PM, Petar Kirov [ZombineDev] wrote:
> On Wednesday, 22 April 2020 at 15:15:24 UTC, Steven Schveighoffer wrote:
>>
>> Really the only use of lazy I use is in enforce.
> 
> I'd say that object.d has some pretty good use cases in addition to 
> enforce:
> 
> inout(V) get(K, V)(inout(V[K]) aa, K key, lazy inout(V) defaultValue):
> https://github.com/dlang/druntime/blob/v2.091.0/src/object.d#L2576
> 
> ref V require(K, V)(ref V[K] aa, K key, lazy V value = V.init):
> https://github.com/dlang/druntime/blob/v2.091.0/src/object.d#L2605
> 
> 
> 

Right, and I still think doing mutations in those expressions would be 
confusing.

-Steve


More information about the Digitalmars-d mailing list