Im not sure it being statically typed is a reason for no default values, kotlin, scala and many others have it.
I guess in Go's eyes they value explicitness over developer convenience in this case. That's not to say either is right or wrong, just an opinion on language design
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Just read it, great post! :-)
Still a bummer there's no "default argument value" in Go, but I understand the point, especially in a strictly typed system.
You can still cheat with structs and default values though
Thanks!
Im not sure it being statically typed is a reason for no default values, kotlin, scala and many others have it.
I guess in Go's eyes they value explicitness over developer convenience in this case. That's not to say either is right or wrong, just an opinion on language design