Also still thinking about a type system for Forth... probably wouldn't make sense for cOS, but for Dusk OS and my DS OS dream project... it might just work.
One route would be to take existing cOS/dOS code and verify its correctness with external annotations, the other would be something more like Factor, where the type information is also used for interface resolution and optimization.
I guesss the second could be built on the first....?
@csepp I've recently implemented factor's stack effect inference and it's a ton of fun to watch it find stack imbalances, extending forth to do this sort of preprocessing gymnastics is a blast :)
I'm looking forward to see what you cook up!
https://docs.factorcode.org/content/article-inference.html