Re: [go-nuts] Can we not invoke methods on types referring to generics?

2023-10-20 Thread 'Axel Wagner' via golang-nuts
FWIW I think what OP is ultimately asking about is some form of nominal subtyping. When they say "automatic upcasting", they refer (I believe) to what Go calls "assignability", which is in essence a subtype relationship. So they want to be able to define a new type, that is a subtype of an

[go-nuts] recommended statistics package? Requirements: ANOVA, Brown-Forsythe

2023-10-20 Thread 王富民awaw
Hi follow Gophers I wonder is there a canonical, verifiably correct Go package for statistics? In particular, Go code that does the Brown-Forsythe test of equal variance. Ideally in pure Go, but linking with CGo is OK. A search on Google and pkg.go.dev does not return helpful results. I wonder

Re: [go-nuts] Can we not invoke methods on types referring to generics?

2023-10-20 Thread Nurahmadie Nurahmadie
On Fri, 20 Oct 2023 at 16:58, 'Axel Wagner' via golang-nuts < golang-nuts@googlegroups.com> wrote: > FWIW I think what OP is ultimately asking about is some form of nominal > subtyping. When they say "automatic upcasting", they refer (I believe) to > what Go calls "assignability", which is in

Re: [go-nuts] Can we not invoke methods on types referring to generics?

2023-10-20 Thread 'Axel Wagner' via golang-nuts
On Fri, Oct 20, 2023 at 1:07 PM Nurahmadie Nurahmadie wrote: > This statement doesn't feel right to me, one can always do `type NewType > struct{}` to create genuinely new types, but if you do `type String > string`, for example, surely you expect String to has `string` value, hence > there will

Re: [go-nuts] Re: Recommended way to distribute pre-compiled C-dependencies for modules using CGO ?

2023-10-20 Thread Jan
Thanks for all the replies. Unfortunately, as I found out today, including the `.a` (static libraries) in the Github just got to its limit (100Mb), so I don't think this is an option anymore :( I'm going to investigate the Gihtub LFS (Large File Storage), not sure how well it will integrate

Re: [go-nuts] Can we not invoke methods on types referring to generics?

2023-10-20 Thread Bakul Shah
On Oct 19, 2023, at 9:02 PM, Nurahmadie Nurahmadie wrote: > > Is it not possible to have both _auto_ downcasting and new method binding to > work in Go? What you are suggesting may make things more *convenient* but at the same time the potential for accidental mistakes goes up. The key is find

Re: [go-nuts] Can we not invoke methods on types referring to generics?

2023-10-20 Thread Nurahmadie Nurahmadie
> Personally, I find "why" questions suspicious. They are usually thinly > disguised requests to change the existing behavior. And that appears to be > the case for this discussion. > No, that's not to be the case, I do imagining the change, but am not thinking of requesting any change, I know

Re: [go-nuts] What tool is used in Go Playground's import handling?

2023-10-20 Thread Ian Lance Taylor
On Thu, Oct 19, 2023 at 8:31 PM Pratik Tamgole wrote: > > When I use packages, any packages in general, how does the import("fmt") line > correct itself to include the used packages in the program? What tool is > implemented here, I want to put the same in my editor.

[go-nuts] About allowing conversion from bool to int

2023-10-20 Thread Victor Giordano
Hello fellow gopherships... ¿How you doing? Hope just fine! A week ago I proposed to allow conversion from bool to int, assuming false to 0 and true to be 1. This was the proposal and I do appreciate a lot the polite responses from Ian. I pick my

[go-nuts] Re: About allowing conversion from bool to int

2023-10-20 Thread Volker Dobler
I use 1 a lot and 4 (or the suggested bool<-->int conv) never. I have no idea what you want to express with 2 and 4 addresses a kind of problem that has no simple solution like a one-line function. V. On Friday, 20 October 2023 at 15:12:06 UTC+2 Victor Giordano wrote: > Hello fellow

Re: [go-nuts] Re: About allowing conversion from bool to int

2023-10-20 Thread Victor Giordano
Volker. I don't know how to reply to what you state. I'm open to listen or read any thoughts you have about not using bool to int. El vie, 20 oct 2023 a las 12:20, Volker Dobler () escribió: > I use 1 a lot and 4 (or the suggested bool<-->int conv) never. > I have no idea what you want to

Re: [go-nuts] Re: About allowing conversion from bool to int

2023-10-20 Thread Victor Giordano
My intention is to actually know any reason about not pushing forward that proposal... because I need to understand why... *Is there any reason out there? I don't know where to ask * I tried to put on the table pros and cons.. but no further feedback was received. *Request* [image: image.png]

Fwd: [go-nuts] Re: About allowing conversion from bool to int

2023-10-20 Thread Victor Giordano
-- Forwarded message - De: Victor Giordano Date: vie, 20 oct 2023 a las 19:09 Subject: Re: [go-nuts] Re: About allowing conversion from bool to int To: Volker Dobler Volker I'm very grateful for your answer! Thanks!!! > A lot of people (me included) do not see this change as

Re: [go-nuts] Re: About allowing conversion from bool to int

2023-10-20 Thread Volker Dobler
I have to admit I do not understand your intention. You made a proposal to change the language. A lot of people (me included) do not see this change as good (not needed, other solutions are available, lots of drawbacks, bad experience with such stuff in general, edge case, can be done in trivial

Re: [go-nuts] Re: About allowing conversion from bool to int

2023-10-20 Thread Ian Lance Taylor
On Fri, Oct 20, 2023 at 2:14 PM Victor Giordano wrote: > > My intention is to actually know any reason about not pushing forward that > proposal... because I need to understand why... *Is there any reason out > there? I don't know where to ask * > The first step is to read

Re: [go-nuts] Re: About allowing conversion from bool to int

2023-10-20 Thread Victor Giordano
Ian thanks! Yes.. I admit that I haven't read those issues entirely Now I have finished reading and also reach this very interesting issue At first glance I noticed these comments - Adg commentt