|
|
|
|
|
by starttoaster
934 days ago
|
|
Is it a perfect language? Far from. But it's a language where I've recognized more pros than cons to using it. My primary complaint lately has been with the inflexible unmarshal functions that cause weird behaviors with converting serialized objects into structs. A recent example is if you use cobra-cli, arguably the most common CLI framework, which ships with another dependency, Viper, for managing your app configuration. If you unmarshal a config with a map[string]anything, where the map keys may contain periods, it just cuts off everything at the first period because it uses periods behind the scenes as a delimiter _for some reason._ Basically, take some yaml like: ``` stuff: 1 things.and.stuff: 2 ``` If you unmarshal this yaml into a `map[string]int`, the string keys will actually be, "stuff" and "things". Completely dropping the ".and.stuff". Wild. Keep in mind, this is specific to the Viper unmarshaller, the stdlib json or yaml unmarshallers actually handle this fine, I just have other similar complaints about those. Given this is my main complaint, not performance or general syntax, I do enjoy writing applications in the language though. What's the language you're using these days that you feel accomplishes the jobs you need it for better than Go? And preferably also has strong concurrency builtins and is typed. |
|
As for specific languages, that's not really my area of expertise. Mojo looks promising in some ways. But it may never be suitable for systems programming.