4 ms·
If verbosity is a main stickler, this is coming to golang 1.28 which will cut it down drastically: https://github.com/golang/go/issues/12854#issue-110104883 ht
by geenat 4mo ago
If verbosity is a main stickler, this is coming to golang 1.28 which will cut it down drastically:
https://github.com/golang/go/issues/12854#issue-110104883 https://github.com/golang/go/issues/12854#issue-110104883
- p2detar 4mo agoThat actually looks great. Thanks a lot for the link.
- nasretdinov 4mo agoBeing able to just return {}, err when returning an empty struct from a function sounds really exciting and encouraging to use pointers less, which is really good for nil safety if anything
- joaohaas 4mo agoI know general consensus on this is that it is good, but I hate this. The fact that both assignments do completely different things (with the map one doing heap allocs!) is insane. This would've been much better if it only allowed for anonymous structs. var A string = "A" type Foo struct { A string } var a Foo var b map[string]string a = {A: "abc"} b = {A: "abc"}
- ngrilly 4mo agoYes, I'm so happy it has been accepted. It will particularly useful to pass named parameters to functions.