My brain was stuck on subtyping yesterday, and when I thought about how
subtyping relates to type-list interfaces I realized that they could be
made more orthogonal — and more like existing interface types, more useful
as sum types, and perhaps even more amenable to specialization via
type-switches
On Sat, Jun 20, 2020 at 5:25 PM Ian Lance Taylor wrote:
> On Fri, Jun 19, 2020 at 1:50 PM Bryan C. Mills wrote:
> >
> > On Fri, Jun 19, 2020 at 2:38 PM Ian Lance Taylor
> wrote:
> >>
> >> On Fri, Jun 19, 2020 at 9:31 AM Bryan C. Mills
> wrote:
> >> >
> >> > On Fri, Jun 19, 2020 at 1:30 AM Ian
On Fri, Jun 19, 2020 at 1:50 PM Bryan C. Mills wrote:
>
> On Fri, Jun 19, 2020 at 2:38 PM Ian Lance Taylor wrote:
>>
>> On Fri, Jun 19, 2020 at 9:31 AM Bryan C. Mills wrote:
>> >
>> > On Fri, Jun 19, 2020 at 1:30 AM Ian Lance Taylor wrote:
>> >>
>> >> This code is acting as though, if ordinary
On Fri, Jun 19, 2020 at 2:38 PM Ian Lance Taylor wrote:
> On Fri, Jun 19, 2020 at 9:31 AM Bryan C. Mills wrote:
> >
> > On Fri, Jun 19, 2020 at 1:30 AM Ian Lance Taylor
> wrote:
> >>
> >> This code is acting as though, if ordinary interface types could have
> >> type lists, it would be OK to wr
On Fri, Jun 19, 2020 at 9:31 AM Bryan C. Mills wrote:
>
> On Fri, Jun 19, 2020 at 1:30 AM Ian Lance Taylor wrote:
>>
>> This code is acting as though, if ordinary interface types could have
>> type lists, it would be OK to write
>>
>> func Add2(x, y SmallInt) SmallInt { return x + y }ᵢ
>>
>> That
I agree generally with constraint and interface really being different
should be named differently. Is the simplest solution that is also clean
to have a constraint type that only allows the type parameter (for now) and
can also include an interface type? The generic definitions can allow for
On Fri, Jun 19, 2020 at 1:30 AM Ian Lance Taylor wrote:
> On Wed, Jun 17, 2020 at 7:58 PM 'Bryan C. Mills' via golang-nuts
> wrote:
> >
> > On Wednesday, June 17, 2020 at 12:08:59 AM UTC-4 Ian Lance Taylor wrote:
> >>
> >> On Tue, Jun 16, 2020 at 9:04 PM Xie Zhenye wrote:
> >> >
> >> > I agree.
On Wed, Jun 17, 2020 at 7:58 PM 'Bryan C. Mills' via golang-nuts
wrote:
>
> On Wednesday, June 17, 2020 at 12:08:59 AM UTC-4 Ian Lance Taylor wrote:
>>
>> On Tue, Jun 16, 2020 at 9:04 PM Xie Zhenye wrote:
>> >
>> > I agree. constraint is different from normal interface. It's better to use
>> > t
On Wednesday, June 17, 2020 at 12:08:59 AM UTC-4 Ian Lance Taylor wrote:
> On Tue, Jun 16, 2020 at 9:04 PM Xie Zhenye wrote:
> >
> > I agree. constraint is different from normal interface. It's better to
> use type SomeConstraint constraint {} than type SomeConstraint interface {}
>
> That is
On Tue, Jun 16, 2020 at 9:04 PM Xie Zhenye wrote:
>
> I agree. constraint is different from normal interface. It's better to use
> type SomeConstraint constraint {} than type SomeConstraint interface {}
That is an option, but then we would have two different concepts,
constraints and interfaces
I agree. constraint is different from normal interface. It's better to use
type SomeConstraint constraint {} than type SomeConstraint interface {}
On Wednesday, June 17, 2020 at 11:12:24 AM UTC+8 Brandon Dyck wrote:
> I find it a little strange that an interface with a type list can only be
>
11 matches
Mail list logo