Re: [go-nuts] Re: Generics are overrated.

2017-08-10 Thread David Collier-Brown
On 10/08/17 09:09 AM, roger peppe wrote: On 10 August 2017 at 13:39, David Collier-Brown wrote: On 10/08/17 02:47 AM, Henrik Johansson wrote: I beg to differ. Most Java apps I have seen over many years almost unanimously suffer from over-modeling. A former customer did

Re: [go-nuts] Re: Generics are overrated.

2017-08-10 Thread roger peppe
On 10 August 2017 at 13:39, David Collier-Brown wrote: > On 10/08/17 02:47 AM, Henrik Johansson wrote: >> >> I beg to differ. Most Java apps I have seen over many years almost >> unanimously suffer from over-modeling. > > > A former customer did a deep, thoughtful, *thorough*

Re: [go-nuts] Re: Generics are overrated.

2017-08-10 Thread David Collier-Brown
On 10/08/17 02:47 AM, Henrik Johansson wrote: I beg to differ. Most Java apps I have seen over many years almost unanimously suffer from over-modeling. A former customer did a deep, thoughtful, *thorough* model of bracket tournaments, without any attempt to abstract the salient features.

Re: [go-nuts] Re: Generics are overrated.

2017-08-10 Thread Henrik Johansson
I beg to differ. Most Java apps I have seen over many years almost unanimously suffer from over-modeling. That Go encourages another style of modeling does not make it too simple. It only makes it different which may be good or bad according to taste. That said, I personally think that generics

Re: [go-nuts] Re: Generics are overrated.

2017-08-08 Thread Jan Mercl
On Tue, Aug 8, 2017 at 1:37 PM Haddock wrote: > Currently Java developers would not change to Go. Never enough of good news. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

[go-nuts] Re: Generics are overrated.

2017-08-08 Thread Haddock
In my opinion generics added to Go would make Go really take off. Currently Java developers would not change to Go. With Go having generics this would change and more people would consider Go also when not coming from Java/C#/etc. -- You received this message because you are subscribed to the

[go-nuts] Re: Generics are overrated.

2017-08-06 Thread Lucio
Got it. In the same document: "Halfway the functional design of the X1, I guess early 1957, Bram and Carel confronted me with the idea of the interrupt, and I remember that I panicked, being used to machines with reproducible behaviour. How was I going to identify a bug if I had introduced

[go-nuts] Re: Generics are overrated.

2017-08-06 Thread Lucio
Thank you, Peter. Maybe someone else can corroborate my impression that Dijkstra did not immediately accept the idea of interrupts and felt it would make programming too difficult? Lucio. On Saturday, 5 August 2017 19:44:26 UTC+2, peterGo wrote: > > Lucio, > > "It took Dijkstra quite some

[go-nuts] Re: Generics are overrated.

2017-08-05 Thread David Collier-Brown
Ah well, one can always go back to COPY PAYLIB REPLACING A BY PAYROLL B BY PAY-CODE C BY GROSS-PAY D BY HOURS. (Courtesy of

Re: [go-nuts] Re: Generics are overrated.

2017-08-05 Thread judsonwilson via golang-nuts
I program using Go every day at Google, and I enjoy the language, but I feel that the lack of generics is a downer. I also find the language to be like Unix in that it is so simple it takes a genius to understand it. On Saturday, July 29, 2017 at 3:59:55 PM UTC-7, Shawn Milochik wrote: > > As

[go-nuts] Re: Generics are overrated.

2017-08-04 Thread Lucio
(Some unjustifiable opinionated ramblings from a faraway place, read at your peril.) It took Dijkstra quite some effort to accept the concept of "interrupts" (quotation anyone?), but eventually he went with it. Resistance to operator overloading is as admirable as it is futile. Ultimately,

[go-nuts] Re: Generics are overrated.

2017-08-04 Thread as . utf8
I'm hesitant to accept generics due to the fear of *overloaded operators *being the next big deal*. *C# even has *properties (user-defined methods dispatched upon an assignment operation)*. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] Re: Generics are overrated.

2017-08-03 Thread Dorival Pedroso
Agreed! And I was a "heavy" user of templates (see e.g. http://mechsys.nongnu.org/, including extensive use of "expression templates") ~5 years ago before the "wonders of Go". Let's focus on making Go faster instead! Cheers. Dorival On Friday, July 28, 2017 at 10:41:10 PM UTC+10,

Re: [go-nuts] Re: Generics are overrated.

2017-08-03 Thread Doğan Kurt
> > it's amazing to see what people were able to accomplish with 2KB RAM, > *one* general-purpose register, no hardware multiply/divide, > Constraints boost creativity and discipline programmer. You may like this .

Re: [go-nuts] Re: Generics are overrated.

2017-08-03 Thread DV
I think "need" is indeed one of those special words that means different things for different people. Go doesn't "need" generics and you technically don't "need" anything except air, water, food, a sharp spear, and shelter, to survive. I recently started toying with writing quick-n-dirty

Re: [go-nuts] Re: Generics are overrated.

2017-08-01 Thread Dan Kortschak
On Tue, 2017-08-01 at 09:21 +0200, Sebastien Binet wrote: > the other place I had (very recently) felt they could have been > useful: >  - having a mat.Dense of math/big.Rat (in lieu of a mat.Dense of > float64) I think that would be very hard. The reasons behind this claim are that there is lot

Re: [go-nuts] Re: Generics are overrated.

2017-08-01 Thread roger peppe
On 31 July 2017 at 19:35, Tristan Colgate wrote: > > > On Mon, 31 Jul 2017, 18:21 roger peppe, wrote: >> >> >> > import hpaInformer informer >> > >> > myInformer := hpaInformer.New(sharedUnderlyingCacheThing) >> >> So... to me, the implementation of

Re: [go-nuts] Re: Generics are overrated.

2017-08-01 Thread Sebastien Binet
On Tue, Aug 1, 2017 at 2:06 AM, Dan Kortschak wrote: > We use sets in the graph packages, but the number of set types is > pretty limited (sets of nodes and sets of either int or int64) and > map[T] works for that level of use. > > The only other place where it

Re: [go-nuts] Re: Generics are overrated.

2017-07-31 Thread Dan Kortschak
We use sets in the graph packages, but the number of set types is pretty limited (sets of nodes and sets of either int or int64) and map[T] works for that level of use. The only other place where it might be useful for us is in in place of generating float32 versions of float64 blas and lapack

[go-nuts] Re: Generics are overrated.

2017-07-31 Thread Tristan Colgate
On Mon, 31 Jul 2017, 18:21 roger peppe, wrote: > > > import hpaInformer informer > > > > myInformer := hpaInformer.New(sharedUnderlyingCacheThing) > > So... to me, the implementation of NewHorizontalPodAutoscalerInformer looks > pretty much exactly like what you've got there,

Re: [go-nuts] Re: Generics are overrated.

2017-07-31 Thread Tristan Colgate
Re-posting to the list. On Mon, 31 Jul 2017, 14:15 roger peppe, wrote: > On 30 July 2017 at 08:22, Tristan Colgate wrote: > >> >> >> On Sat, 29 Jul 2017, 23:59 Shawn Milochik, wrote: >> >>> >>>- You don't need generics to write

Re: [go-nuts] Re: Generics are overrated.

2017-07-31 Thread roger peppe
On 30 July 2017 at 08:22, Tristan Colgate wrote: > > > On Sat, 29 Jul 2017, 23:59 Shawn Milochik, wrote: > >> >>- You don't need generics to write Kubernetes. >> >> I've had no personal need for generics, but k8s client-go is the one case > I've

[go-nuts] Re: Generics are overrated.

2017-07-31 Thread Mandolyte
It's been many years since I was involved in developing complex systems (C++ and Java). But I agree, it was mostly lists and sets with searching and sorting. But I also used them for algorithms a good bit. Thus I would guess that the maintainers of GONUM libraries might benefit (anyone

[go-nuts] Re: Generics are overrated.

2017-07-30 Thread David Collier-Brown
I came to Go from languages that had generics, but in practice I find that I predominantly used list-of and set-of. And I spent a dispropriate amount of time with valgrind making sure my C++ list didn't have leaks (:-() A question to people who use Java/C++ and friends: what generics do you

[go-nuts] Re: Generics are overrated.

2017-07-30 Thread Mandolyte
Just a reminder that Egon Elbre's documentation of all the discussions on this topic is here: https://docs.google.com/document/d/1vrAy9gMpMoS3uaVphB32uVXX4pi-HnNjkMEgyAHX4N4 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] Re: Generics are overrated.

2017-07-30 Thread mhhcbon
"This thread was about concerns that generics would divide Go community" that d would dismiss any attempt to propose generics *because* it s generics, instead of the observation that the proposal does breaks everything including the community. maybe the first thing to do is to ban this word

[go-nuts] Re: Generics are overrated.

2017-07-30 Thread dogan . kurt
Daily reminder: This thread was about concerns that generics would divide Go community. Not about necessity of generics in general. Two possible scenarios: 1) Go have programmers from very different backgrounds, some used generics often while others never used it. (e.g. Java and C). So

[go-nuts] Re: Generics are overrated.

2017-07-30 Thread mhhcbon
i have not read this, 1. i do go because the type system is helping me, if i do js, i have no type system, so i have to figure this out by myself, its hard if i d be doing java, i d end up with complex giant scaled type hierarchy, both cases, it d more a difficulty than an helper to my attempt

Re: [go-nuts] Re: Generics are overrated.

2017-07-30 Thread Russel Winder
On Sat, 2017-07-29 at 18:59 -0400, Shawn Milochik wrote: > […] > > Imagine if Go programmers went to other language mailing lists and > complained about the lack of goroutines and channels, which clearly > make > those other language "unfit for concurrent programming." That would > be > equally

Re: [go-nuts] Re: Generics are overrated.

2017-07-30 Thread Tristan Colgate
On Sat, 29 Jul 2017, 23:59 Shawn Milochik, wrote: > >- You don't need generics to write Kubernetes. > > I've had no personal need for generics, but k8s client-go is the one case I've seen where I thought they would help, the informers packages in particular.

Re: [go-nuts] Re: Generics are overrated.

2017-07-30 Thread Jérôme LAFORGE
> As with every community, there's the silent majority and the vocal minority. But when we let the community to manifeste it choice (even if little part of this community that reply to survey) in regarding the 2016 golang survey: What changes would improve Go most? 1 generics -- You received

Re: [go-nuts] Re: Generics are overrated.

2017-07-29 Thread Shawn Milochik
As with every community, there's the silent majority and the vocal minority. It's easy to be confused, and think that the lack generics is a major issue in the Go community. It is *not*. The number 500,000 Go developers worldwide has been thrown around a lot this month.

Re: [go-nuts] Re: Generics are overrated.

2017-07-29 Thread Jesper Louis Andersen
On Sat, Jul 29, 2017 at 6:36 PM wrote: > I just want to know sincerely, if people REALLY need generics so much, or > they are just complaining because they are used to it and it's in their > favorite programming language. > > Generics tend to serve at least two purposes

Re: [go-nuts] Re: Generics are overrated.

2017-07-29 Thread Robert Melton
On Sat, Jul 29, 2017, at 13:33, dogan.k...@dodobyte.com wrote: >> Also, building a basic one yourself if you don't want to use those tends to >> be exceptionally straightforward. > > Thanks for examples, i can't tell if they are experimental or viable for > production use. I am not sure the

Re: [go-nuts] Re: Generics are overrated.

2017-07-29 Thread Daniel
I'm curious: are there use-cases where template generation with gengen/genny/etc are not enough? seems to me that calling "go generate" a few times (when you need to generate generic containers for certain types) is a very fair tradeoff to have generic containers without having to change the

Re: [go-nuts] Re: Generics are overrated.

2017-07-29 Thread dogan . kurt
> > Also, building a basic one yourself if you don't want to use those tends > to be exceptionally straightforward. > Thanks for examples, i can't tell if they are experimental or viable for production use. But if it's that straightforward, why people complain about it too much. I

[go-nuts] Re: Generics are overrated.

2017-07-29 Thread dogan . kurt
I was watching rus cox's last talk and he mentioned that not every problem should be solved by language change. Some can be solved by tooling or library change. I am curious has any of the generics lovers written a tool that helps for generic

Re: [go-nuts] Re: Generics are overrated.

2017-07-29 Thread Jan Mercl
On Sat, Jul 29, 2017 at 5:18 PM wrote: > write a compile time type safe generic reduce function with the following signature which works for all slices of any element type : > > func reduce(array []A,out B,in A)B {} > you can't do that in Go . You've nonchalantly

[go-nuts] Re: Generics are overrated.

2017-07-29 Thread prades . marq
I love playing with package reflect, which is much more powerful than generics by the way (you can't implement gob or json with generics). You could absolutely do that without runtime reflection. It is called compile time type safe macros ... Oh wait, Rust has them, and generics and a correct

[go-nuts] Re: Generics are overrated.

2017-07-29 Thread Roberto Zanotto
I love playing with package reflect, which is much more powerful than generics by the way (you can't implement gob or json with generics). On Saturday, July 29, 2017 at 3:28:56 PM UTC+2, M P r a d e s wrote: > > What is overrated is the use of "interface { }" and reflection AKA runtime > magics

Re: [go-nuts] Re: Generics are overrated.

2017-07-29 Thread Jan Mercl
On Sat, Jul 29, 2017 at 3:28 PM wrote: > What is overrated is the use of "interface { }" and reflection AKA runtime magics which has no place in a modern statically typed language. interface{} is not a replacement of generics. Interfaces with a real methods set, like

[go-nuts] Re: Generics are overrated.

2017-07-29 Thread prades . marq
What is overrated is the use of "interface { }" and reflection AKA runtime magics which has no place in a modern statically typed language. It's a cop-out, it's dirty and a direct consequence of the absence of generics in Go. > Please provide some best practices to achieve generic behavior for