3 ms·
> In a dynamic language I could simply work with a deeply nested data structure of maps and lists, and I’d handle the casting at the very end of the process. In
by dleslie 8y ago
> In a dynamic language I could simply work with a deeply nested data structure of maps and lists, and I’d handle the casting at the very end of the process. In a dynamic language, I could treat everything as a string till the very end, and then cast to integers or dates or floats or strings as needed. In a dynamic language, I could write the code faster, with less errors, and with less code.
Nothing described is impossible, or even hard, for a statically typed language to do.
Perhaps I misunderstand them, but author seems to be under the impression that static typing doesn't allow for type conversions.
> In static-type languages such as Java, I’m forced to go with either #1 or #2, and they are both bad options.
That's simply not true.