DIP54 : revamp of Phobos tuple types

Timon Gehr timon.gehr at gmx.ch
Sun Dec 29 20:35:04 PST 2013


On 12/30/2013 05:08 AM, Dicebot wrote:
> On Monday, 30 December 2013 at 03:37:56 UTC, Timon Gehr wrote:
>>> It is in line with general rule of opXXX for structs working as syntax
>>> rewrite.
>>
>> No, it is not.
>
> "No" as in "not in line" or "you interpret rules wrong"?
> ...

Both. There is no precedent for rewriting operator arguments to template 
value arguments neither in the spec, in newsgroup discussions on the 
design of a potential feature, nor in the implementation. You seemed to 
claim this is merely a compiler bug and this can be deduced from the 
spec by analogy, so you also appear to interpret rules wrong.

>>> Me too. Maybe it should be addressed in general by defining
>>> template-argument opXXX - than it is subject of own DIP indeed. It is
>>> not critical for this DIP implementation so I did not think about it in
>>> details but it can make implementation much more hygienic.
>>
>> It's critical if you want to support the real opSlice.
>
> What do you mean by "real"?

The one that actually gives you a Pack back.

> Naive alias this implementation will be
> sliceable. Problem is without this feature it will degenerate into raw
> argument list upon slicing which is not clean but not fatal (still an
> improvement over existing TypeTuple)

Questionable. Slicing is a common operation.


More information about the Digitalmars-d mailing list