News for hackers. Stuff that matters.
Re:Go generics may use square brackets [] not parenthesis () by deanCommie on Tuesday July 14, 2020 @10:34PM (#23840572)
> making simple tools like gofmt impossible.

So now we're making language design decisions based on the limitations of the bonus linter?

My opinion of Golang drops more and more with every new detail I learn about it...

Re:Go generics may use square brackets [] not parenthesis () by doctor_eval on Tuesday July 14, 2020 @11:05PM (#23840761)
One of the benefits of Go is super fast compilation time. Unlimited look ahead is likely to make the compiler slower. Ergo, it’s not a great idea.
Re:Go generics may use square brackets [] not parenthesis () by estebank on Wednesday July 15, 2020 @01:05PM (#23848121)
Parser speed is negligible contributor to slowness in any compiler. rustc has a couple of places were it performs bounded lookahead to supply suggestions for incorrect code, but the grammar of the language is regular. 3rd party tools don't have to worry about it, and users get accurate suggestions. The cost is 1) you have to implement a more complex parser while 2) making people go "you already know what I meant, just take it without me using the 'ugly' turbofish". It think this is the correct approach for language design.
Re:Go generics may use square brackets [] not parenthesis () by monocasa on Tuesday July 14, 2020 @10:39PM (#23840601)
Go has a lot of problems, but continung to support gofmt's quest including the simplicity it desires isn't one of them.