▲ | fozdenn 2 days ago | |||||||||||||||||||||||||||||||
doesn't this point to a bigger problem that there are two ways of doing the same thing? | ||||||||||||||||||||||||||||||||
▲ | nikolayasdf123 2 days ago | parent | next [-] | |||||||||||||||||||||||||||||||
no. it is different thing. container-agnostic zero value vs struct init. | ||||||||||||||||||||||||||||||||
▲ | unsnap_biceps 2 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||
multiple ways of doing something isn't inherently bad. For example, if you want to set a variable to the number of seconds in seven hours, you could just set the variable to 25200, or you could set it to 60 * 60 * 7. The expanded version might be clearer in the code context, but in the end they do exactly the same thing. | ||||||||||||||||||||||||||||||||
|