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 you
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
fun
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, Vikra
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
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
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 run
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 t
(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 64-bit
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
frictionle
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,
> >
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 desc
The entire notion of the constraints package feels a little suspicious to
me. What if the comparable and ordered constraints were pre-declared in the
universe block, and the numeric constraint were named math.Numeric? What
other universal (or close to universal) constraints would belong in this
ent
12 matches
Mail list logo