3 ms·
Whenever SICM comes up here on HN it receives a lot of admiration. One thought that a lot of people have is whether there would be advantages in trying to do so
by da39a3ee 6y ago
Whenever SICM comes up here on HN it receives a lot of admiration. One thought that a lot of people have is whether there would be advantages in trying to do something like that in a statically typed language. Have you thought about types and SICMUtils?
- sritchie 6y agoHey, I have... I'm a co-author of Algebird[0], which has many ideas that I'd pull over. I'm hoping to introduce Clojure's "spec" or "schema" libraries so that the types at play can at least be inspectable inside the system. In a fully typed language, I'd implement the extensible generics as typeclasses. I suspect it would make it quite a bit tougher (at least in the approach I'm imagining) for folks to write new generic functions, due to many type constructors... On the other hand, the complexity is there, even if you don't write it down! It would be a big project, and a worthy effort, to write down types for everything in SICM. [0] https://github.com/twitter/algebird https://github.com/twitter/algebird
- kloimhardt 6y agoI made a scratch like visual programming system for sicmutils, clj-tiles[0]. Types are inspectable by right-clicking->Inspect on a specific block. Clj-tiles uses Clojure spec under the hood. One note: I am not sure whether a static type system can improve on this for someone who wants to learn Physics. After all, the types of function parameters change during the running program, as the same functions are called several times. But see for yourself: [0] https://kloimhardt.github.io/cljtiles.html?page=pendulumfinal https://kloimhardt.github.io/cljtiles.html?page=pendulumfina...