3 ms·
I totally agree. I was curious how much typing overhead there is in the swift version so ported that blog post's code into nodejs. In node, the whole thing come
by josephg 8y ago
I totally agree. I was curious how much typing overhead there is in the swift version so ported that blog post's code into nodejs. In node, the whole thing comes in under 30 lines with comments. (Compared with 86 lines in the final version from that blog post).
https://gist.github.com/josephg/469ddbe71b7c515247b0db801325c511 https://gist.github.com/josephg/469ddbe71b7c515247b0db801325...
The reality is you always have to do more work to interact with JSON data from a static language because you need to tell the compiler what type everything will be. The benefit you get from doing that can pay off in larger projects, but for quick and dirty scripts its a lot of wasted effort.