On Wed, Jul 8, 2020 at 3:59 AM roger peppe wrote:
>
> That's another interesting syntax. I'm not sure whether there's any
> particular advantage in mentioning the type parameter in each case,
> although I guess it does mean that the syntax for multiple matches is
> straightforward and can allow
On Wed, 8 Jul 2020 at 00:33, Steven Blenkinsop wrote:
> On Tue, Jul 7, 2020 at 10:44 AM, roger peppe wrote:
>
>>
>> In my description, there's no assumption that doing it over the type
>> parameter implies a refinement of the previously set type constraints. In
>> fact it definitely implies
On Tue, Jul 7, 2020 at 10:44 AM, roger peppe wrote:
>
> In my description, there's no assumption that doing it over the type
> parameter implies a refinement of the previously set type constraints. In
> fact it definitely implies otherwise because (for example) if you know that
> a generic type
On Tue, 7 Jul 2020 at 21:05, Tobias Gustafsson <
tobias.l.gustafs...@gmail.com> wrote:
> Den tisdag 7 juli 2020 kl. 16:45:21 UTC+2 skrev rog:
>>
>> On Tue, 7 Jul 2020 at 10:36, Tobias Gustafsson
>> wrote:
>>
>>> Hi all,
>>>
>>> Thanks for the response on this subject!
>>>
>>> Yes, a kind of type
Den tisdag 7 juli 2020 kl. 16:45:21 UTC+2 skrev rog:
>
> On Tue, 7 Jul 2020 at 10:36, Tobias Gustafsson > wrote:
>
>> Hi all,
>>
>> Thanks for the response on this subject!
>>
>> Yes, a kind of type switch over generic types is probably what I
>> envision. There is a potentially nice symmetry
On Tue, 7 Jul 2020 at 10:36, Tobias Gustafsson <
tobias.l.gustafs...@gmail.com> wrote:
> Hi all,
>
> Thanks for the response on this subject!
>
> Yes, a kind of type switch over generic types is probably what I envision.
> There is a potentially nice symmetry with the current runtime type
Hi all,
Thanks for the response on this subject!
Yes, a kind of type switch over generic types is probably what I envision.
There is a potentially nice symmetry with the current runtime type switches
and type annotations that caught my eye (being aware of the fact that
finding false patterns
How about something like this?
Type switches
A *generic type switch* allows a generic function to provide specialized
behaviour based on its type arguments (for example to use a more efficient
implementation for some types).
A type switch refines the type of a type parameter. Cases match actual
On Mon, Jul 6, 2020 at 6:29 PM, roger peppe wrote:
>
> I've also been playing around in this area. I've been trying something
> similar to this approach: https://go2goplay.golang.org/p/sHko_EMhJjA
> But this isn't ideal - note that we lose type safety when assigning back
> to the generic hash
On Mon, 6 Jul 2020 at 17:46, wrote:
> Hi!
>
> I've spent some time lately to try out the go2go tool and the new generics
> proposal by converting a small hack I did some years ago for immutable data
> structures (https://github.com/tobgu/peds) which, in it's current shape,
> depends on code
On Mon, Jul 6, 2020 at 9:46 AM wrote:
>
> I've spent some time lately to try out the go2go tool and the new generics
> proposal by converting a small hack I did some years ago for immutable data
> structures (https://github.com/tobgu/peds) which, in it's current shape,
> depends on code
Hi!
I've spent some time lately to try out the go2go tool and the new generics
proposal by converting a small hack I did some years ago for immutable data
structures (https://github.com/tobgu/peds) which, in it's current shape,
depends on code generation.
There is nothing really mind bending
12 matches
Mail list logo