Feedback Thread: DIP 1037--Add Unary Operator ...--Community Review Round 1

Manu turkeyman at gmail.com
Sat Oct 31 23:00:32 UTC 2020


On Sat, Oct 31, 2020 at 4:30 AM Andrei Alexandrescu via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On 10/27/20 10:34 PM, Manu wrote:
> > I mention that it's a postfix unary operator. I think that implies the
> > precedence, no?
> > All the postfix operators work from the inside outwards. If there's
> > precedence levels in there that I didn't notice, then I can amend to
> > make it explicit.
>
> I'd say there's enough subtlety to this to warrant explanation. For
> starters, it's not quite an operator because operators yield
> expressions, whereas this yields a comma-separated list.


Just to be clear, is there a difference between a comma-separated list and
a tuple?
If there is a difference, then `...` results in a tuple, and NOT a comma
separated list. The result of `...` is a normal tuple, like any other
tuple, and it is subject to D's normal expansion rules. This DIP proposes
no effect on existing tuple expansion rules, and plugs into them naturally.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20201101/6111c981/attachment.htm>


More information about the Digitalmars-d mailing list