A couple of extensions to `with` that would be worthwhile
SeeWebsiteForEmail at erdani.org
Thu Oct 14 02:58:32 UTC 2021
On 10/13/21 4:13 PM, Timon Gehr wrote:
> On 10/13/21 1:13 PM, Andrei Alexandrescu wrote:
>> We can improve the `with` statement as follows:
> I don't think this is an "improvement" of the `with` statement. It's a
> completely novel feature that happens to be syntactically very close to
> the existing `with` statement. There's an obvious meaning for the new
> syntax as an extension of the existing feature, but it is not what you
> propose. Not great. Maybe there is a better way to address this problem?
You're right. The `while (type)` and `while (type):` at top level is
probably good to salvage.
More information about the Digitalmars-d