Re: [go-nuts] The next layer of abstraction for Go development?

2020-06-13 Thread burak serdar
I would also question the need for a "full-fledged" framework. The motivation behind such frameworks is to make development (writing) easier by either making some choices you otherwise have to make which would require a deeper understanding of the problem and solution domains or by deferring those

Re: [go-nuts] The next layer of abstraction for Go development?

2020-06-13 Thread Robert Engels
That is why a senior engineer creates a facade for the specific problem domain. > On Jun 13, 2020, at 3:29 PM, 'Axel Wagner' via golang-nuts > wrote: > >  > Maybe a dumb question but: Why would we *need* a standard framework? > > We're currently re-working this at my workplace and in the pro

[go-nuts] New tool and vscode extension to optimize your structures: cpu cache alignment, memory packing, false sharing guarding, and more.

2020-06-13 Thread John Brown
Hello gophers, recently I published go tool and extension for vscode to help with some common performance transformations for structs, such as: - cpu cache alignment - memory packing - false sharing guarding - auto annotation - generic fiel

Re: [go-nuts] The next layer of abstraction for Go development?

2020-06-13 Thread 'Axel Wagner' via golang-nuts
Maybe a dumb question but: Why would we *need* a standard framework? We're currently re-working this at my workplace and in the process, I've looked at both go-kit and micro. Ultimately, at least as far as I can tell, they don't seem to solve any of the problems I'm seeing, though. Both of them te

[go-nuts] The next layer of abstraction for Go development?

2020-06-13 Thread asim
Might not be the right place for this discussion but also useful to gauge the experiences of the community. For the most part Go embodies a standard library philosophy and most people are opposed to using any full fledged framework. With Go now being a decade old, I feel as though with that mat

Re: [go-nuts] Go has eliminated most of my off-by-one errors except 0... I mean 1.

2020-06-13 Thread Jan Mercl
On Sat, Jun 13, 2020 at 5:37 PM Jake Montgomery wrote: > You cant really write a short 'end()' function. You have to write an end > function for every type of slice. Or use reflection, which would make the > function slow, and not inlined. Generics anyone? I haven't mentioned anything about th

Re: [go-nuts] Go has eliminated most of my off-by-one errors except 0... I mean 1.

2020-06-13 Thread C Banning
https://play.golang.org/p/EZEXmBig1y- On Saturday, June 13, 2020 at 9:37:35 AM UTC-6, Jake Montgomery wrote: > > > > On Saturday, June 13, 2020 at 10:55:43 AM UTC-4, Jan Mercl wrote: >> >> On Sat, Jun 13, 2020 at 4:42 PM Tom Limoncelli >> wrote: >> >> I'd suggest to just write the short 'end' f

Re: [go-nuts] Go has eliminated most of my off-by-one errors except 0... I mean 1.

2020-06-13 Thread Jake Montgomery
On Saturday, June 13, 2020 at 10:55:43 AM UTC-4, Jan Mercl wrote: > > On Sat, Jun 13, 2020 at 4:42 PM Tom Limoncelli > wrote: > > I'd suggest to just write the short 'end' function by yourself if you > think it's useful for you. It does not harm performance as it will get > inlined AFAICT. >

Re: [go-nuts] Go has eliminated most of my off-by-one errors except 0... I mean 1.

2020-06-13 Thread Jan Mercl
On Sat, Jun 13, 2020 at 4:42 PM Tom Limoncelli wrote: I'd suggest to just write the short 'end' function by yourself if you think it's useful for you. It does not harm performance as it will get inlined AFAICT. But it IMO hurts readability a bit. I'd prefer to read the explicit `len(x)-1` instea

[go-nuts] Go has eliminated most of my off-by-one errors except 0... I mean 1.

2020-06-13 Thread Tom Limoncelli
tl;dr: Go's "range" operator has eliminated the most common trap where I make off-by-one errors. The next largest category of off-by-one errors would be eliminated if there was a way to specify the last item in an array. It would also improve a developer's ability to convey intent. ... I've bee