The posts in the first linked series ( http://inessential.com/2016/05/ ) seem to mostly focus on how dynamism can avoid the need for boilerplate. For example, he states that the following code is tedious to write and error-prone: if localObject.foo != serverObject.foo { localObject.foo = serverObject.foo changeDictionary[fooKey] = serverObject.foo } if localObject.bar != serverObject.bar { localObject.foo = serverObj…
> It's certainly slower. That's the least of problems, since nowadays we have smart runtime systems that dynamically optimize running programs. It's not elegant, but it works. A more fundamental problem is that this approach to programming leads to brittle code, and when it breaks, it doesn't warn you until it's too late.
I guess reflection fits into the general category of dynamism even if it is essentially an existing Swift feature.
In any case, to respond to your point: Objective-C does not have a JIT, and since there are a lot of advantages to a pure ahead-of-time compilation model (see the mailing list post linked elsewhere in this thread), as a language mainly focused on static compilation, Swift is unlikely to get one in the future just to deal with hypothetical dynamic features. Anyway, even in the relatively small set of languages that are both highly dynamic (going beyond simple reflection) and well-optimized - there's JavaScript, and LuaJIT I guess? and maybe some less common ones, there's PyPy but I don't call that well-optimized - if you actually use the dynamic features it's easy to fall off the JIT happy path and make your whole function unoptimizable. See [2]. But that's getting off topic.
[1] In making that thinko I showed my lack of Swift experience: in Rust reflection is done with macros.
[2] https://github.com/petkaantonov/bluebird/wiki/Optimization-k...