3 ms·
First off, interesting blog. I can appreciate the author thinks that dynamic types are cool, and he/she/they like being weird and contrarian. That's cool. Me
by jesse__ 4y ago
First off, interesting blog. I can appreciate the author thinks that dynamic types are cool, and he/she/they like being weird and contrarian. That's cool. Me too. That said, I'd like to point out that the article focuses on dynamic runtime-metaprogramming, but (largely) fails to address it's statically-typed cousin, compile-time metaprogramming. I'd like to broaden the conversation a bit.
I'll quote the author:
> a dynamically typed language is one where types are runtime values and manipulable like all other values. It’s a short hop from there to thinking of the whole runtime environment in the same way, where everything is a runtime construct.
If you have a decent compile-time metaprogramming system paired with a statically typed/compiled language, (almost) the same statement holds true. It's not as easy to, for example, instrument a production instance with brand new code at runtime, but the mental model while programming is very similar.
> The overall picture is of going one step further than homoiconicity: instead of code as data we have programs as data.
This is the heart of what metaprogramming is all about and, to my mind, really has nothing to do with static vs dynamic types.
The author finishes with 'crushing disappointment'. I somewhat share this sentiment, though I have great hope as well; there are some incredibly talented developers working on the compile-time version of these problems. Maybe one day we'll have good languages. I guess the only thing we can do is continue writing new ones until we do ;)
- karmakaze 4y agoCame to say roughly the same thing. The post seems to conflate a number of things. Static/dynamic is about compile time (in dev environment) and run time in (production). Not being opposite doesn't mean that you need much of both depending on how expressive the compile time is. Types being runtime values can also work during the compile runtime as noted. A very good example to look at is the `comptime` in Zig, it could be enlightening and the opposite of 'crushing disappointment'.