On Tue, Jan 14, 2025 at 4:19 PM Mike Schinkel <m...@newclarity.net> wrote: > > Given this I am now pondering why it would not be possible and acceptable it > Go could allow relaxing of the need to type cast — on an opt-in basis — when > going from a derived time to its base type?
There is a related discussion in https://go.dev/issue/71183. it's worth noting that you can already in part do what you want, by using generics. func ToLower[S ~string](s S) S { ... } Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcUMRTbSGqUN6%3D3py8OxdJX9MDZieuvcwfz1ArnHPTrWBw%40mail.gmail.com.