[go-nuts] Go 1.20 is released

2023-02-01 Thread 'Michael Knyszek' via golang-nuts
Hello gophers, We have just released Go 1.20. To find out what has changed in Go 1.20, read the release notes: https://go.dev/doc/go1.20 You can download binary and source distributions from our download page: https://go.dev/dl/#go1.20 If you have Go installed already, an easy way to try

Re: [go-nuts] Silly question about parentheses

2023-02-01 Thread David Finkel
On Wed, Feb 1, 2023 at 11:22 AM Chris Burkert wrote: > Looking into the spec: > > https://go.dev/ref/spec#Return_statements > ReturnStmt = "return" [ ExpressionList ] . > ExpressionList = Expression { "," Expression } . > ... no () here > > https://go.dev/ref/spec#Function_types > FunctionType

Re: [go-nuts] Silly question about parentheses

2023-02-01 Thread Chris Burkert
Looking into the spec: https://go.dev/ref/spec#Return_statements ReturnStmt = "return" [ ExpressionList ] . ExpressionList = Expression { "," Expression } . ... no () here https://go.dev/ref/spec#Function_types FunctionType = "func" Signature . Signature = Parameters [ Result ] . Result

Re: [go-nuts] Silly question about parentheses

2023-02-01 Thread Raphael Clancy
This is really helpful! Thank you! At first I assumed that it was down to 'go fmt' letting you be fairly loose with your syntax and that you could omit parentheses where the meaning wouldn't be ambiguous. But on closer examination, there must be something else going on because 'return a, b'

Re: [go-nuts] Silly question about parentheses

2023-02-01 Thread 'Axel Wagner' via golang-nuts
Good point, didn't think of that On Wed, Feb 1, 2023, 15:30 p...@morth.org wrote: > It would actually be ambiguous in the very place they're required. > > Consider this not completely unreasonable example: > https://go.dev/play/p/OL0uOnPZXju > > Also, with generics it could be ambiguous in type

Re: [go-nuts] Silly question about parentheses

2023-02-01 Thread p...@morth.org
It would actually be ambiguous in the very place they're required. Consider this not completely unreasonable example: https://go.dev/play/p/OL0uOnPZXju Also, with generics it could be ambiguous in type parameters. To summarize, parentheses are needed around the return types because otherwise

Re: [go-nuts] gollvm build fails

2023-02-01 Thread 'Than McIntosh' via golang-nuts
Hello, The gollvm build with LLVM tip is currently broken; there have been some upstream LLVM changes that aren't compatible with the Gollvm bridge code (notably the opaque pointer migration), which causes build failures. This is a known problem, I haven't had enough free time to fix it