3 ms·
Meanwhile, in Ruby...foo could contain any conceivable data structure, which you'll have to reflect on and test against extensively in a production environment
by Zikes 12y ago
Meanwhile, in Ruby...foo could contain any conceivable data structure, which you'll have to reflect on and test against extensively in a production environment if you don't want your application falling flat on its face at the first sign of unexpected input.
Go would have similar problems with unexpected input, it just frontloads the work, so if you do something stupid then you'll know it up front.
- moe 12y agowhich you'll have to reflect on and test against extensively if you don't want your application falling flat on its face Even with full blown JSON schema validation we'd arrive at 2 lines of ruby code plus ~5 for the schema.
- Zikes 12y agoSo 2 lines of Go and ~5 for the struct. Is your argument that the schema is defined outside of Ruby and therefore doesn't count as LOC?