diff --git a/POST.md b/POST.md index a3d8a4c..809107a 100644 --- a/POST.md +++ b/POST.md @@ -373,6 +373,24 @@ questo porterebbe a vari problemi sul come generare il codice per questo tipo in Un modo potrebbe essere fare come Rust e non permettere definire interfacce/trait con metodi/funzioni che introducono nuovi tipi parametrici, vedremo in Go 2... + + ## Quando non usare le generics? Ci potrebbe venire in mente di scrivere una funzione per leggere tutto da un `io.Reader` aggiungendo il vincolo `io.Reader` al _type parameter_ diff --git a/go.mod b/go.mod index 42d7552..1a2fa0d 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module talk go 1.19 -require golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 // indirect +require golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2