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

Manu turkeyman at gmail.com
Sun Nov 1 21:47:26 UTC 2020

On Sun, Nov 1, 2020 at 8:50 PM Ola Fosheim Grøstad via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On Sunday, 1 November 2020 at 10:15:44 UTC, claptrap wrote:
> > To me "alias sequence" is an implementers name, it's named for
> > how it's implemented not for the actual concept.
> Yes, but tuples should have struct semantics, and structs hold
> values, not aliases.

Why? I don't agree with this at all. I actually expect tuples DON'T have
struct semantics.
The thing my DIP talks about are things that don't have struct semantics...
what is that called?

Anyway, this would all become moot if the ... operator was
> designed to work with all static length objects that provide
> index-access and .length.

Make a DIP then. I don't like that idea. It's problematic to know if you
are dealing with a kind of thing that can be unrolled until much later in
semantic when it should have already been done.

It's trivial to implement a static unroll: `MyList[iota!(MyList.length)]...`
Which can easily become: `alias StaticUnroll(T) = T[iota!(T.length)]...`
->   `StaticUnroll!T`
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20201102/2c38086e/attachment-0001.htm>

More information about the Digitalmars-d mailing list