3 ms·
EDIT: of course, moments after I submitted this comment, I found the following in the spec: "For more flexibility, at the cost of performance and causing mista
by Smaug123 3y ago
EDIT: of course, moments after I submitted this comment, I found the following in the spec:
"For more flexibility, at the cost of performance and causing mistakes to be discovered only when the program is being executed, the dyn type can be used. A variable of this type can contain any kind of value or reference. Assignment to a dyn variable never fails. However, using the variable where a specific type is expected will invoke a runtime type check. For this purpose the dyn type stores information about the actual type."
Original comment below for posterity.
----
The article claims that Zimbu has "both static and dynamic typing", which sounds novel and interesting to me. But on the Zimbu site linked by a sibling, all I could find (on https://web.archive.org/web/20230529230025/http://www.zimbu.org/design/goals https://web.archive.org/web/20230529230025/http://www.zimbu....) was:
> It should work to have as much static type checking as possible, but make it possible to have dynamic types with runtime type checking.
Can anyone find any more details about this feature? (Or does it just mean "there's a type `obj` which is a supertype of every type", which is much less interesting except insofar as it interacts with what it means for something to be a reference vs value type?) The spec at https://web.archive.org/web/20230805135331/https://www.moolenaar.net/z/zimbu/spec/zimbu.html https://web.archive.org/web/20230805135331/https://www.moole... is awfully long.
- thechao 3y agoSounds like gradual typing, maybe? That stuff was hot, years ago. Jeremy Siek is one the original inventors — his stuff is really approachable.
- Jtsummers 3y agoI suspect an autoincorrect incident. Jeremy Siek, he also has a couple compiler books out now (basically the same book, one with Python and one with Racket). https://wphomes.soic.indiana.edu/jsiek/ https://wphomes.soic.indiana.edu/jsiek/ Essentials of Compilation, both versions have a chapter on gradual typing.