[go-nuts] [RFC] Syntactic Dissonance

2024-01-05 Thread John Pritchard
Hi, Here's a case of "type dissonance" I don't understand. Why should it be? https://github.com/syntelos/go-sort An interface type not passing through a static public package function that employs the interface. type Comparable interface { Compare(Comparable) int } func Sort(array []Compa

Re: [go-nuts] Type parameter embedded field

2024-01-05 Thread Mike Schinkel
On Friday, January 5, 2024 at 12:59:25 AM UTC-5 Axel Wagner wrote: 3. Someone comes up with a clever new compromise. Here is a strawman proposal: Allow `Nullable`: type Nullable[T any] struct { T valid bool } By generating a compile error when a developer attempts to use a type as a parame