Eigenstate: myrddin-dev mailing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 0/2] impl specialization and lookup changes


On Sat, Jul 01, 2017 at 10:28:58PM -0700, Ori Bernstein wrote:
> The interesting part in this example is that the type
> of the expression here might have no relation to the
> type that the trait is specialized over.

Ah that's right!  I focused too much on the first
example.  Type hints would be of no use in the
second one.  So it looks like something else is
really necessary. 

It might be more related to explicit passing of
generic parameters to functions, like Ori suggested.
Because Name in the second example can be seen as
a function

    Name : (implem: name(@a) -> byte[:])

where the argument is implicitely inserted by
the compiler.  Assuming you see the trait as
a record type.

This seems to suggest that a consistent syntax
for the two makes sense.

Syntax does not count much, though.  So I'm
totally fine with Michael's suggestion.

Cheers,

-- 
Quentin 

Follow-Ups:
Re: [RFC PATCH 0/2] impl specialization and lookup changesOri Bernstein <ori@xxxxxxxxxxxxxx>
References:
[RFC PATCH 0/2] impl specialization and lookup changesMichael Forney <mforney@xxxxxxxxxxx>
Re: [RFC PATCH 0/2] impl specialization and lookup changesQuentin Carbonneaux <quentin@xxxxxx>
Re: [RFC PATCH 0/2] impl specialization and lookup changesOri Bernstein <ori@xxxxxxxxxxxxxx>