Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread Robert Engels
Of course. But you don’t design a language (or any other product) for the 5% - you design it for the 95 (80?} percent - if you want you have customers/users and stay relevant (in business). > On Dec 31, 2020, at 8:39 PM, 'Axel Wagner' via golang-nuts > wrote: > >  >> On Thu, Dec 31, 2020 at

Re: [go-nuts] Generics, please go away!

2020-12-31 Thread Alex Besogonov
> On Dec 31, 2020, at 15:10, Axel Wagner wrote: > > On Thu, Dec 31, 2020 at 9:27 PM Alex Besogonov > wrote: > Moreover, Go has inheritance as well (struct embedding and interface > inheritance), making it a fairly typical example. > > Interfaces yes (though I

Re: [go-nuts] Signature Switch - third path to Go generics

2020-12-31 Thread Wojciech S. Czarnecki
Dnia 2020-12-31, o godz. 13:15:00 "K. Alex Mills" napisał(a): > At a glance, this feels to me like it is more complicated than the current > generics proposal. That said, it also seems very original so I have to give > credit there. It is just the other kind, as I see it. You know, it was born j

Re: [go-nuts] gollvm: capture-fcn-attributes.go generates the header file with improperly chosen CPU model (i686; yonah)

2020-12-31 Thread Ivan Serdyuk
Happy New Year, Than. So I have rebuilt llvm-goc, after applying https://go-review.googlesource.com/c/gollvm/+/270219 . Here is my compressed build folder. I am using $ clang --version cla

Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread 'Axel Wagner' via golang-nuts
On Thu, Dec 31, 2020 at 6:51 PM robert engels wrote: > Go has been in existence for 10+ years and has fairly wide adoption in > some areas - so it is not hard to make the case that generics are “not an > important thing” > This has been brought up in That Other Thread, so let me copy what I said

Re: [go-nuts] Re: Generics, please go away!

2020-12-31 Thread 'Axel Wagner' via golang-nuts
On Fri, Jan 1, 2021 at 1:23 AM Space A. wrote: > > Sorry to disappoint you (actually, no, not sorry) but OOP has nothing to > do with inheritance. It's a common feature in object-oriented programming > but it's not essential. > > Moreover, Go has inheritance as well (struct embedding and interfac

Re: [go-nuts] Re: Generics, please go away!

2020-12-31 Thread Space A.
Missed your second question. > > But on the topic of generics, this entire thread seems alarmist. >> Generics will open a huge door for libraries to be written that will make >> our lives easier. I'm thinking specifically about data processing and >> machine learning. A lot of devs use Python r

Re: [go-nuts] Re: Generics, please go away!

2020-12-31 Thread Space A.
> Sorry to disappoint you (actually, no, not sorry) but OOP has nothing to do with inheritance. It's a common feature in object-oriented programming but it's not essential. > Moreover, Go has inheritance as well (struct embedding and interface inheritance), making it a fairly typical example. The o

Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread Wojciech S. Czarnecki
Dnia 2020-12-31, o godz. 13:41:34 Kevin Chadwick napisał(a): > Thank You all for my favourite language and Happy New Year! Happy New Year! Kevin, forgive me that I'd chosen your *nonpartisan* message to cool this particular thread and insert here an announcement of the third way to Go generic

Re: [go-nuts] Re: Generics, please go away!

2020-12-31 Thread 'Axel Wagner' via golang-nuts
On Thu, Dec 31, 2020 at 9:27 PM Alex Besogonov wrote: > Moreover, Go has inheritance as well (struct embedding and interface > inheritance), making it a fairly typical example. > Interfaces yes (though I would use "subtyping", not "inheritance", but potato tomato), but struct embedding, no. Embe

Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread da...@suarezhouse.net
Real use cases have been provided it appears for both why generics can be good and how they can be used negligently (love the sextuple example BTW). I know many things in programming can be used the wrong way but does generics potentially cross a threshold where the writer should add an import

[go-nuts] Re: Generics - please provide real life problems

2020-12-31 Thread Alex Besogonov
On Wednesday, December 23, 2020 at 10:16:00 PM UTC-8 Martin Hanson wrote: > If all we're presented are these small theoretical examples of sorting > lists, etc., then clearly this is nothing but hype that needs to go > away. > My personal example: ordered containers. My code works with physical

[go-nuts] Re: Generics, please go away!

2020-12-31 Thread Alex Besogonov
On Wednesday, December 30, 2020 at 12:23:35 PM UTC-8 Space A. wrote: > > OOP isn't specific about how inheritance is handled (or if it is even > supported) > Oh my... It is pure sophistic nonsense. OOP is all about inheritance. Not > just whether you have "objects" in a language spec or not. >

Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread Ian Lance Taylor
On Thu, Dec 31, 2020 at 5:42 AM Kevin Chadwick wrote: > > On 12/30/20 6:38 PM, Ian Lance Taylor wrote: > > I don't think this is accurate. Surveys express a clear and > > consistent desire for generics that is far ahead of requests for > > operator overloading or other language features. (To avo

Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread Ian Lance Taylor
On Thu, Dec 31, 2020 at 4:56 AM Space A. wrote: > > ok, so please read it finally and tell which point exactly you think was > against CoC and in what of my messages and in which exact thread, but do not > put my words out of context. And explain why you responded just now, and to > my message

Re: [go-nuts] Signature Switch - third path to Go generics

2020-12-31 Thread Ian Lance Taylor
On Thu, Dec 31, 2020 at 10:37 AM Wojciech S. Czarnecki wrote: > > I regard current Team's proposal a way better than the first iteration. But - > while I see a need for generic way to write common code, I also share > concerns about readability and future abuse of the materialized Go generics > be

Re: [go-nuts] Signature Switch - third path to Go generics

2020-12-31 Thread K. Alex Mills
At a glance, this feels to me like it is more complicated than the current generics proposal. That said, it also seems very original so I have to give credit there. This proposal seems to put the responsibility for monomorphizing generic code onto the programmer. I'm not sure why it would be simpl

Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread roger peppe
Here's one real life example that I came across recently. I have a CRUD API that supports a bunch of different entity types. They all support a superset of the same operations. Each method represents a single HTTP call. If the generics proposal was implemented, I'd be able to define a common inte

Re: [go-nuts] Linux distro..based only on GO

2020-12-31 Thread Wendell Hatcher
no On Thu, Dec 31, 2020, 10:26 AM L Godioleskky wrote: > All Linux distros are currently based on several languages (Python, Perl, > C/ C++ etc) as well as tool-type packages like GTK etc > > ... What if, there was a Linux distro based entirely on GO ? > This would greatly reduce the Lin

[go-nuts] Signature Switch - third path to Go generics

2020-12-31 Thread Wojciech S. Czarnecki
I regard current Team's proposal a way better than the first iteration. But - while I see a need for generic way to write common code, I also share concerns about readability and future abuse of the materialized Go generics being similar to "the other languages". I consciously did not patricipate i

Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread Space A.
> hi Space, Hey, > i do not care about this discussion in general > i would not want to enter into a discussion with you So it's up to you, isn't it? Should I invite you? Or maybe anyone else should? I don't know you and don't care about your existence (as you said, I don't mean any disrespe

Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread robert engels
Go has been in existence for 10+ years and has fairly wide adoption in some areas - so it is not hard to make the case that generics are “not an important thing” - depends on what you are trying to do with it and what your perspective on “the right way” is. > On Dec 31, 2020, at 10:54 AM, 'Axe

Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread 'Axel Wagner' via golang-nuts
On Thu, Dec 31, 2020 at 5:46 PM robert engels wrote: > I’ll state for the record again, I was originally very dismayed that Go > did not offer generics - after developing with it for a while that is far > less of an issue to me than the error handling. > Just to illustrate that the plural of "an

Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread robert engels
95% was a recalled-guess. I previously linked to an academic paper that studied uses of generics in Java, and I believe that was the number - regardless it was a very, very high percentage. Interestingly, I had a previous client that was a case-study in generics gone wrong. No kidding, they had

Re: [go-nuts] Linux distro..based only on GO

2020-12-31 Thread Sebastien Binet
I believe that's what u-root is: - https://github.com/u-root/u-root there are probably others. ‐‐‐ Original Message ‐‐‐ On Thursday, December 31st, 2020 at 4:40 PM, Kevin Chadwick wrote: > On 12/31/20 3:26 PM, L Godioleskky wrote: > > > It seems to me a Linux distro based entirely o

Re: [go-nuts] Linux distro..based only on GO

2020-12-31 Thread Kevin Chadwick
On 12/31/20 3:26 PM, L Godioleskky wrote: > > It seems to me a Linux distro based entirely on GO would be another major GO > milestone.   > Is this do-able given the current capability of GO? > It would seem not, unless you throw the unix philosophy out of the window completely wrt one tool, one

[go-nuts] Linux distro..based only on GO

2020-12-31 Thread L Godioleskky
All Linux distros are currently based on several languages (Python, Perl, C/ C++ etc) as well as tool-type packages like GTK etc ... What if, there was a Linux distro based entirely on GO ? This would greatly reduce the Linux footprint given the huge number of libraries Linux currently uses to

Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread Martin Schnabel
hi Space, i do not care about this discussion in general and learned to trust the go developers to be thoughtful and reasonable. i wouldn't write this normally, but in case you are not aware it might actually help: i did read the last couple of your messages to this list again and came to th

Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread Kevin Chadwick
On 12/30/20 6:38 PM, Ian Lance Taylor wrote: > I don't think this is accurate. Surveys express a clear and > consistent desire for generics that is far ahead of requests for > operator overloading or other language features. (To avoid > misunderstanding I'll say again that changes to the Go langu

Re: [go-nuts] Generics - please provide real life problems

2020-12-31 Thread Space A.
Hi, ok, so please read it finally and tell which point exactly you think was against CoC and in what of my messages and in which exact thread, but do not put my words out of context. And explain why you responded just now, and to my message to a person who obviously *violated* its terms by aggressi

Re: [go-nuts] Re: Generics - please provide real life problems

2020-12-31 Thread 'Axel Wagner' via golang-nuts
Hi, On Thu, Dec 31, 2020 at 8:59 AM wilk wrote: > If 95% of generics are collections the current draft is overkill. > What about a simplified version with only one generic type (like we do > with interface{}), without constraint as long as it can compile ? > • "Only one generic type" means you