Re: [go-nuts] [generics] no methods with type parameters

2020-06-20 Thread Carsten Orthbandt
And there goes my illusion about golang-nuts being a constructive discussion. Thanks, I'm out. -- 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+unsubs

Re: [go-nuts] [generics] no methods with type parameters

2020-06-20 Thread Carsten Orthbandt
? I prefer interfaces, but its not a big deal in application. Not being able to orthogonally structure an applications type family? That is a big deal in my view, borderline embarrassing. On Saturday, June 20, 2020 at 6:20:33 PM UTC+2, Carsten Orthbandt wrote: > > Reflection certainl

Re: [go-nuts] [generics] no methods with type parameters

2020-06-20 Thread Carsten Orthbandt
ch of a problem. What's > considered idiomatic Go has changed in the past and will continue to > change. For example, with the new APIs in the `errors` package, idiomatic > error handling is changing. It's fine for things to change if we add > type-parameter on methods as wel

[go-nuts] Re: [generics] no methods with type parameters

2020-06-20 Thread Carsten Orthbandt
, June 20, 2020 at 9:31:53 AM UTC-4, Carsten Orthbandt wrote: >> >> Hi! >> >> First, thanks to the Go team for the hard work and the list populace for >> an extremely low-noise list. Very much appreciated. >> >> In the recent draft, struct methods with typ

[go-nuts] [generics] no methods with type parameters

2020-06-20 Thread Carsten Orthbandt
Hi! First, thanks to the Go team for the hard work and the list populace for an extremely low-noise list. Very much appreciated. In the recent draft, struct methods with type parameters are explicitly excluded with a note that they might be added later. I think I roughly understand the added co

[go-nuts] Re: DeepCloning a datastructure

2020-04-17 Thread Carsten Orthbandt
The easiest way is to marshal everything into some sort of byte slice, then unmarshal back. JSON doesn't work for this if there are private fields. But gotiny (https://github.com/niubaoshu/gotiny) does. If you use interfaces in your data, you have to register their types, everthing else is autom

Re: [go-nuts] Godoc index generator fails in gob encoder due to size

2018-05-16 Thread Carsten Orthbandt
y, writing big blobs on a network. See > https://github.com/golang/go/issues/14140. > > -rob > > > On Wed, May 16, 2018 at 5:36 PM, Carsten Orthbandt > wrote: > >> On my system the command >> >> godoc -v -index -index_files=/var/tmp/godoc_index.db -wr

[go-nuts] Godoc index generator fails in gob encoder due to size

2018-05-16 Thread Carsten Orthbandt
On my system the command godoc -v -index -index_files=/var/tmp/godoc_index.db -write_index runs for quite a while, then finishes with a warning message about the gob encoder: 2018/05/16 14:54:23 initialize file systems 2018/05/16 14:54:23 updating index... 2018/05/16 15:11:46 index updated (104

[go-nuts] chan chan Job per worker vs. single chan Job

2017-11-23 Thread carsten . orthbandt
Hi! This should be covered somewhere already but I can't find it. So here's my question: Assume N workers running in a goroutine each and a number of Job tasks coming in. The consensus appears to be to have one dispatcher goroutine collecting all jobs, then pulling a ready worker from a singl