Generic memory allocation in D

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Sat Mar 9 15:06:44 UTC 2024


On 09/03/2024 9:19 PM, Daniel N wrote:
> On Saturday, 9 March 2024 at 00:09:38 UTC, Walter Bright wrote:
>> It's not about performance, it's about competing notions of clarity.
> 
> Sounds like you want the guard statement...
> 
> https://docs.swift.org/swift-book/documentation/the-swift-programming-language/statements/#Guard-Statement
> 
> https://docs.swift.org/swift-book/documentation/the-swift-programming-language/thebasics/#Force-Unwrapping

So basically an if statement but without the true block.

I don't see why the parser couldn't support that!

Its probably even a removal of an if statement ;)


More information about the Digitalmars-d mailing list