Re: [go-nuts] Re: A proof-of-concept implementation of my generics proposal for Go

2019-06-30 Thread Michal Strba
I fixed the importing issues people were having with version of Go newer than 1.10. If you haven't tried the generics tool yet and you're interested, now it should work for you! It's a tool that takes a Go file which uses generics and translates it into a regular Go code that you can run. It also

Re: [go-nuts] Re: A proof-of-concept implementation of my generics proposal for Go

2019-06-27 Thread Randall O'Reilly
I also like this proposal, and have a related proposal with a somewhat different syntax that is even simpler and is essentially identical to existing Go code, just with “Generic Native Types” (GNT). Here’s a couple of side-by-side comparisons: /// // Min Michal’s: func Min(x,

[go-nuts] Re: A proof-of-concept implementation of my generics proposal for Go

2019-06-27 Thread Ben Hoyt
I really, really like this. I liked the original proposal, but using the "type" keyword seems very natural. And I like the 80/20 constraints thing with eq/ord/num. Good work -- I hope this gets turned into an official proposal and debated. -Ben On Thursday, June 27, 2019 at 10:29:03 AM UTC-4,