Re: [go-nuts] [Generics] Constraints package name

2020-07-26 Thread 'Axel Wagner' via golang-nuts
On Sun, Jul 26, 2020 at 1:05 PM wrote: > Also, the name "is" doesn't follow the usual naming style of Go packages. >> > > I'm not sure if there is a Go standard library package naming style other > than "relatively short name". > "relatively short name" is less consistently applied than "be

Re: [go-nuts] Does method with pointer receiver keeps track of the receiver instance

2020-07-26 Thread Tony Yang
No problem, thanks! On Fri, Jul 24, 2020 at 8:26 PM Ian Lance Taylor wrote: > On Fri, Jul 24, 2020 at 4:25 PM burak serdar wrote: > > > > On Fri, Jul 24, 2020 at 5:21 PM Ian Lance Taylor > wrote: > > > > > > On Fri, Jul 24, 2020 at 4:07 PM Tony Yang wrote: > > > > > > > > Hi Go community, >

Re: [go-nuts] Generic symbol metaproposal

2020-07-26 Thread Michael Jones
I'm never sure how much detail to share. The colorForth idea is a perfect example of the thought about "another dimension" of specification. (Albeit difficult to implement in practice). The upper/lower case signal is a good one, and easy; it is limiting, but not terribly, and offers easy

[go-nuts] CGo-free SQLite database/sql driver for linux/amd64 v1.4.0-beta1 is released

2020-07-26 Thread Jan Mercl
(reddit X-post) >From the change log at https://godoc.org/modernc.org/sqlite#hdr-Changelog 2020-07-26 v1.4.0-beta1: The project has reached beta status while supporting linux/amd64 only at the moment. The 'extraquick' Tcl testsuite reports 630 errors out of 200177 tests on Linux

[go-nuts] Re: How to get the methods list for each struct in golang.org/x/tools/go/ssa?

2020-07-26 Thread xudongsun...@gmail.com
The reason may be that I was using *prog.MethodSets.MethodSet(m.Type())* However, in golang the receiver of a method could be a struct type or a pointer to a struct type. If the receiver of the method is a pointer, then only *prog.MethodSets.MethodSet(types.NewPointer(tm.Type()))* can return

Re: [go-nuts] [Generics] Constraints package name

2020-07-26 Thread Robert Engels
I like ‘is’. Very readable and Go-like. > On Jul 26, 2020, at 6:05 AM, frederik.z...@gmail.com wrote: > >  >> On Sunday, July 26, 2020 at 12:46:38 PM UTC+2, Jesper Louis Andersen wrote: >> >> You can always solve that with a rename: >> >> import ( >> is "constraints" >> ) >> >> but you

Re: [go-nuts] [Generics] Constraints package name

2020-07-26 Thread frederik . zipp
On Sunday, July 26, 2020 at 12:46:38 PM UTC+2, Jesper Louis Andersen wrote: > > > You can always solve that with a rename: > > import ( > is "constraints" > ) > > but you run the risk of users not knowing what the "is" package is. > Of course, but like you said, "is" would be unfamiliar to most

Re: [go-nuts] [Generics] Constraints package name

2020-07-26 Thread Jesper Louis Andersen
On Sun, Jul 26, 2020 at 9:30 AM wrote: > The package name "constraints" is quite a mouthful to read: > > func Min[Elem constraints.Ordered](s []Elem) Elem {} > > Did you consider other package names like "is"? > > func Min[Elem is.Ordered](s []Elem) Elem {} > > You can always solve that with

[go-nuts] Re: Help with Dataframes

2020-07-26 Thread Pee Jai
I created https://github.com/rocketlaunchr/dataframe-go to make dealing with data much easier. It has an example code snipped in the docs on how to write dataframes to a csv file. I created it because I found gota to be very cumbersome to use. On Monday, May 29, 2017 at 9:23:51 PM UTC+10,

[go-nuts] Re: I have own issue my whole project follow relative schema ./db

2020-07-26 Thread Brian Candler
Use go modules. In the top directory: go mod init github.com/username/project-name This creates go.mod in the top directory. Put additional packages in their own subdirectories. But *don't* run "go mod init" for these. They all share the top one. Example: foo/bar.go contains package xyz

[go-nuts] [Generics] Constraints package name

2020-07-26 Thread frederik . zipp
The package name "constraints" is quite a mouthful to read: func Min[Elem constraints.Ordered](s []Elem) Elem {} Did you consider other package names like "is"? func Min[Elem is.Ordered](s []Elem) Elem {} is.Ordered is.Integer is.Signed is.Unsigned -- You received this message because