[OT] Swift removing minor features to piss me off
Nick Treleaven via Digitalmars-d
digitalmars-d at puremagic.com
Fri Apr 29 05:06:40 PDT 2016
On Friday, 29 April 2016 at 06:27:07 UTC, Jacob Carlborg wrote:
> In an ideal world the language would support trailing delegate
> syntax allowing this to work without any language support:
>
> forever {
> }
>
> Translated to:
>
> forever({
>
> });
Or maybe with macros supporting a trailing statement as the last
argument:
macro forever($(Statement st));
$forever {
}
That way it's clearer that magic is happening, but also macros
are by definition inlined. It also doesn't need braces for a
single statement.
A complication with the delegate way is break/continue/return in
the statement block, but I suppose it already works for opApply.
More information about the Digitalmars-d
mailing list