4 ms·
I find this slow march in "modern" language design toward completely static compilation models troublesome to the extreme. It feels like a significant historica
by adrianm 11y ago
I find this slow march in "modern" language design toward completely static compilation models troublesome to the extreme. It feels like a significant historical regression; they speak as if Smalltalk and the Metaobject Protocol are things to revile and shun, not elegant programming models that we as programmers should aspire to understand and use in our own programs.
To elide these features as a matter of principle implies that you believe your compilation model is perfect, and is able to deduce all information necessary for optimal compilation of your program statically, perhaps augmented with profiling information you have obtained from earlier runs. It also makes upgrading programs for users more difficult since patches must be applied in a non-portable manner across programs. I shan't mention the fact that they make iterative, interactive development an ordeal. The Swift REPL is progress (although REPLs for static languages are nothing new), but it still pales in comparison to the development and debugging experience in any Smalltalk or Lisp system.
There is no reason why the typing disciplines Swift is designed to support should demand the eradication of all dynamism in the runtime and object model.
If you have never heard of the Metaobject Protocol or similar concepts before, here is the standard reference: https://mitpress.mit.edu/books/art-metaobject-protocol https://mitpress.mit.edu/books/art-metaobject-protocol
This discussion also reminds me of this essay by Richard P. Gabriel: https://www.dreamsongs.com/SeatBelts.html https://www.dreamsongs.com/SeatBelts.html
- pcwalton 11y agoOK, but Swift is an ahead of time compiled language, unlike Lisp or Smalltalk. That makes the tradeoffs completely different.
- teacup50 11y agoSmalltalk and the Metaobject Protocol are things to revile and shun. They aren't elegant programming models and they aren't even internally consistent programming models. If you read Smalltalk papers, they aren't really compsci papers at all. They're musings about some ideas they tried and how well they thought they worked afterwards. The language world is moving to a more coherent, formal, mathematical understanding of type systems, programming languages, and automatable proof systems.
- chvid 11y agoAbsolutely agreed. I honestly don't care about nicer switch-statements when are a big classes of problems that cannot be solved because of the lack of reflection.