Hacker News new | ask | show | jobs
by perigrin 1915 days ago
I actually find Go harder to work with JSON with for exactly those same reasons. With Go if I want to parse JSON into something I can call methods on, the JSON has to conform to something I can build a struct around. If the JSON is complicated in anyway that doesn't line up with Go's sense of structs I'm forced to drop to map[string]interface{} (or something like it). With Perl I can parse into the hashref equivalent of map[string]interface{} and still be able to bless it and call methods on it.

This isn't to say that Perl is better or Go is better, they just have different affordances. Perl is designed for loosely structured data and that causes all kinds of problems when you want to enforce highly structured data. Go is designed to handle strictly structured data and the ramp down is hard when you don't have that.