alias parameters and basic types

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 31 04:50:35 PDT 2016


On 7/30/16 5:26 PM, deadalnix wrote:
> On Saturday, 30 July 2016 at 21:21:30 UTC, Timon Gehr wrote:
>> On 30.07.2016 22:58, Jonathan M Davis via Digitalmars-d wrote:
>>> The one that needs to be convinced is Walter.
>>
>> IIRC he said at DConf that it should be fixed.
>
> We did a tour of DConf 2015 with David Nadlinger and everybody was super
> confused by this behavior. Pretty much everybody but Walter, David and
> myself could tell you how this behaves. Even Andrei got it wrong.

Walter got it wrong too, I saw when David asked him. That's when he said 
it should be fixed.

The question was, if I alias Int = int, then Int is a symbol. If I pass 
it as an alias parameter, should it work?

> I take that, as you weren't there at the 2016 event, it was reiterated
> in 2016.

Timon was at dconf 2016. I don't recall it being discussed either, but 
maybe in a small discussion?

I think we should fix this. The fact that you can alias int directly, 
but it can't be accepted as an alias parameter makes no sense. It's 
completely doable, and the philosophical argument is destroyed by the 
example.

-Steve



More information about the Digitalmars-d mailing list