Update: I've found something similar in pkgsite
https://github.com/golang/pkgsite/blob/beceacdece62d95d6dc41a9b5f09da7b2a021020/internal/database/reflect.go
so I now assume it's not as far fetched as I thought until now.
Peter Müller schrieb am Freitag, 3. März 2023 um 16:53:07 UTC+1
Hello, would you assess the following usage of `Var[T any]`, `v =
new(Var[T])` and `var person = rel.NewVar[Person]("person")` as valid
pattern, that also enables it to be used in further generic methods, or
would you rather prefer a codegen approach?
```go
type Var[T any] struct {
nam
The other day I had an interesting idea: What if all exported fields have
an implicit getter. Like e.g.
type Human struct {
Age uint
Name string
}
would implicitly get the methods:
func (h Human) Name() string {
return h.Name
}
func (h Human) Age() uint {
return h.Age
}
*When defining an int