Derek McDaniel
1 min readJul 30, 2021

--

Have you tried deconstructing JSON in golang or java. Yeah, there are definite advantages to dynamic typing. And specifically, if you use JSON for all your state/data. Then it's all ready to be saved or sent across the wire.

Nope, static typing is the weirdo. It doesn't match the way we use any verbal language, which is inferring things as they are used.

Dynamic typing has better polymorphism.

There is a case for static typing, but it's really, really, hard to update your datastructures. And objects are a bad way to design, because it factures/partitions your application state.

Objects are good for plumbing things that have no specific relationship to your app, like a database library, or state related to asynchronous web requests.

But for all state that is meaningful to your application, raw, dynamically typed datastructures(ideally JSON), are best. This makes it easier to understand, manipulate design. Etc.

The problem with dynamic typing, is that it tends to be less declarative and more imperative, but there's no reason for this, it's just tradition. (see my npm module "value-types" for more on this)

--

--

Derek McDaniel
Derek McDaniel

Written by Derek McDaniel

Technology, programming, and social economy.

Responses (1)