3 ms·
> Don't use println() println() is nice because it doesn't require an import. For "the smallest possible program" I think it's a good match. > decoders al
by sagichmal 12y ago
> Don't use println()
println() is nice because it doesn't require an import. For "the smallest possible program" I think it's a good match.
> decoders also support simple maps in addition to tagged
> structs
I think it's a mistake to teach Go programmers to decode into map[string]interface{}. It's pretty rare that you actually want to do that.
- Intermernet 12y agoYes, but as stated above "it is not guaranteed to stay in the language". The functions from "fmt" are guaranteed to stay in the language. May as well start learning the language with best practices, even if it does involve an extra line to 'import "fmt"'.
- sagichmal 12y agoI disagree. (shrug)