Being able to add a field to a data type and having the compiler tell you everywhere you need to update the code is a huge productivity multiplier. It’s a shame when languages forego this advantage.
-
-
Scala dev and I hate default params. Person sees a method is used 100x and doesnt want to update call sites / tests, so adds a default for their one case. In a few months, thing now has 5 default params and a bug where someone didn't notice a default was wrong for their call
-
To be clear, that's a different problem, if I'm understanding correctly. That's an opt-in thing you can choose to do. In Go, you can't opt-in or opt-out of default values for structs. It's a core part of the language.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.