|
|
|
|
|
by hwc
713 days ago
|
|
I'm so glad I use Go more than C++ these days. In Go, all values are always zero-initialized if you don't explicitly assign a value. If you need a constructor, you write a regular function that returns an explicitly assigned object. I like keeping the rules of the language simple enough that there is never any confusion. |
|
That being said it’s way less complex than C++’s rules and that’s welcomef.