Re: [go-nuts] Re: Generic syntax idea

2020-06-29 Thread bugpowder
On Mon, Jun 29, 2020 at 7:28 PM Jake Montgomery wrote: > I'm curious how you would propose rewriting: > func Foo(type T comparable, B interface{})(a T, b B, c T) { > You could just annotate each distinct type on first appeareance: func Foo(a T:type comparable, b B:type interface{}, c T) { >

Re: [go-nuts] pure function on golang

2020-07-06 Thread bugpowder
I'd guess the compiler could then enforce it (see if any non-pure marked function is called from a pure one), it could exploit it (e.g. play with evaluation order, cache, etc), and other such things? On Tue, Jul 7, 2020 at 1:00 AM Ian Lance Taylor wrote: > On Mon, Jul 6, 2020 at 9:47 AM wrote:

Re: [go-nuts] filepath.Abs ignores '~'

2020-07-07 Thread bugpowder
On Wed, Jul 8, 2020 at 2:44 AM 'Jacob Kopczynski' via golang-nuts < golang-nuts@googlegroups.com> wrote: > I tried to state a path relative to the home directory, since in the > context I am writing for the path from ~ to the Git repository will be > consistent, though the meaning of ~ may change

Re: [go-nuts] Generics and parentheses

2020-07-18 Thread bugpowder
On Sat, Jul 18, 2020 at 12:12 PM roger peppe wrote: > > - elsewhere in Go, when a name is defined, there is one clear construct >> that defines it, not an arbitrary place within a type expression. That's >> not the case in your proposal. >> > On the other hand, $/@ is not dissimilar to using the

Re: [go-nuts] Generic symbol metaproposal

2020-07-27 Thread bugpowder
IMHO uppercase, single letter for denoting generic types would be a nice syntax / convention. Sure, that would limit to 26 generic types per function ("enough for everybody"?), and probably break some bizarro existing code (using uppercase single-letter characters for parameter names) -- thought s