5 ms·
Isn't that a problem with most typed languages? You're bringing in untyped data, so native types need to be spelled-out somewhere. There's a line somewhere bet
by tcdent 11y ago
Isn't that a problem with most typed languages? You're bringing in untyped data, so native types need to be spelled-out somewhere.
There's a line somewhere between excessive verbosity and dumb trust (like the YAML snafu). I haven't seen great syntax yet, though.
- supster 11y agoAgreed, it would be cool if we could specify untyped zones within a function e.g. @untyped func parse(json: AnyObject) -> String? { /* code here is not type checked, if returned value is not type String then value will become nil */ }
- rjbwork 11y agoNewtonsoft.Json with dynamics is really good at it in the .NET world. I usually use actual typed objects, but the DLR has enabled some cool stuff concerning dynamic input type things.