Re: [go-nuts] Re: Generics and parentheses

2020-07-19 Thread 'Axel Wagner' via golang-nuts
On Mon, Jul 20, 2020 at 8:33 AM Xie Zhenye wrote: > Gramma of a programming language is not able to be changed after released. > So language design is elegant or not is more important than difficulty of > implementing. > > Adding type information in parse time and use angle brackets only affects

[go-nuts] Re: Generics and parentheses

2020-07-19 Thread Xie Zhenye
Gramma of a programming language is not able to be changed after released. So language design is elegant or not is more important than difficulty of implementing. Adding type information in parse time and use angle brackets only affects compiler and 3rd part tools or IDEs in a short time. Prov

Re: [go-nuts] where is temp file created by http server

2020-07-19 Thread hao dong
thx. I'll check it. On Saturday, July 18, 2020 at 12:03:52 AM UTC+8, Jake Montgomery wrote: > > On Thursday, July 16, 2020 at 10:32:32 PM UTC-4, hao dong wrote: >> >> thanks. I've noticed the code,too. And that's what I'm confused: when >> there is a create, there is no delete, and I can not find

[go-nuts] what is walk(fn *Node) for?

2020-07-19 Thread xie cui
the go tool compile will call walk, what 's effect of this call? https://github.com/golang/go/blob/master/src/cmd/compile/internal/gc/walk.go#L20 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving em

[go-nuts] Re: unambiguous = simplicity

2020-07-19 Thread Fino
I am happy to vote for (e) <:g:> BR fino 在2020年7月17日星期五 UTC+8 上午3:41:49 写道: > Which code snippet(s) in GO would be 100 percent unambiguous as generics: > > a) [g] > b) {g} > c) > d) «g» > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To un

Re: [go-nuts] Choosing thread for goroutine?

2020-07-19 Thread Ian Lance Taylor
On Sun, Jul 19, 2020 at 11:48 AM Matt Mueller wrote: > > I'm working on a server-side Javascript rendering package in Go. It uses > https://bellard.org/quickjs/ for it's parser and interpreter. I'm using > https://github.com/lithdew/quickjs to package it with Go. > > Quickjs appears to have some

Re: [go-nuts] Re: golang time.Now().Format with milliseconds without dot in string

2020-07-19 Thread peterGo
Vasiliy Tolstov, "I need to output strings with format MMDDHHMMSSMILLISEC without dot in string. But Go able to output milliseconds only in case of .000" ... "that works with many messages and want to avoid additional memory allocations" The Go standard library does not pretend to provide e

Re: [go-nuts] Go 2 review process

2020-07-19 Thread Tyler Compton
I had forgotten about the multidimensional slices proposal. That's a very good counter-example. On Sun, Jul 19, 2020 at 4:12 AM Ian Davis wrote: > On Sun, 19 Jul 2020, at 2:08 AM, Ian Lance Taylor wrote: > > On Sat, Jul 18, 2020 at 12:19 AM Tyler Compton > wrote: > > > > > > I'm beginning to th

[go-nuts] Choosing thread for goroutine?

2020-07-19 Thread Matt Mueller
Hey folks, I'm working on a server-side Javascript rendering package in Go. It uses https://bellard.org/quickjs/ for it's parser and interpreter. I'm using https://github.com/lithdew/quickjs to package it with Go. Quickjs appears to have some thread-local memory, so I'm use runtime.LockOSThrea

Re: [go-nuts] Re: [generics] Fuzzer, Type Switches

2020-07-19 Thread Steven Blenkinsop
On Sun, Jul 19, 2020 at 11:43 AM, Jake Montgomery wrote: > This seems to work: https://go2goplay.golang.org/p/8veymwXYCoZ > > > I'm confused. It panics when I run it now. > Since the outcome is probably cached, I'm not sure how that could be the case. Did you mean to respond to Ian's modified v

[go-nuts] Re: [generics] Fuzzer, Type Switches

2020-07-19 Thread Jake Montgomery
> > This seems to work: https://go2goplay.golang.org/p/8veymwXYCoZ I'm confused. It panics when I run it now. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: [go-nuts] Go 2 review process

2020-07-19 Thread Ian Davis
On Sun, 19 Jul 2020, at 2:08 AM, Ian Lance Taylor wrote: > On Sat, Jul 18, 2020 at 12:19 AM Tyler Compton wrote: > > > > I'm beginning to think that community members (like myself) can't > > reasonably be expected to put in the necessary effort to champion a sizable > > language change. I think

Re: [go-nuts] [generics] Was "no type contracts" considered?

2020-07-19 Thread Markus Heukelom
I complained myself too about not being able to write a generic Min, Max, but I am not so sure anymore myself of the strength of this argument. The point is: besides Min and Max, what other really good, general, examples are there of really missing? To give an example myself, I'd love to writ

Re: [go-nuts] [generics] question regarding package level generic type declarations

2020-07-19 Thread Markus Heukelom
If you need different type parameters lists, use multiple groups: package collection generic (type T) ( type List struct { root *Node(T) } type Node struct { prev, next *Node(T) } func (l *List(T)) InsertAfter(after* Node(T)) ) generic (type T1, T2) ( MapList(l List(T1), mapFn func(value T1)

Re: [go-nuts] Generics and parentheses

2020-07-19 Thread K Davidson
Not that I am for guillemets, but isn't attempting to push the industry towards a richer pallette than ASCII the whole point of building unicode into the core of go? We already include the middot in go assembly, and some core members of the go team love using unicode identifiers in personal code