News for hackers. Stuff that matters.
Re:Three Months of Go from a Haskeller’s perspective (2016) by Cthulhu_ on Wednesday November 04, 2020 @07:42AM (#24988472)
That is already possible by exposing a `New` function and making the struct itself unexposed; are you suggesting syntax should be added to provide default values to struct fields? Because there is high resistance (which I agree with btw) to adding additional syntax and constructs to the language.
Re:Three Months of Go from a Haskeller’s perspective (2016) by lmm on Wednesday November 04, 2020 @08:22PM (#24994815)
> That is already possible by exposing a `New` function and making the struct itself unexposed;

I thought Go didn't allow functions with default argument values either?