Re:John Carmack: “I just dumped the C++ server I wrote for a...
by steveklabnik on Wednesday March 18, 2015 @09:39AM
(#9225330)
Clojure has Core.Typed, which lets you add optional typing.
Re:John Carmack: “I just dumped the C++ server I wrote for a...
by ufo on Wednesday March 18, 2015 @09:51AM
(#9225417)
Core.Typed is directly inspired by typed racket :)
Re:John Carmack: “I just dumped the C++ server I wrote for a...
by kyllo on Wednesday March 18, 2015 @09:59AM
(#9225468)
Does Typed Racket give you a way to run your whole program through a typechecker without executing the code? Because catching type errors at compile time is a major benefit you get from a static type checker, that you wouldn't get from just runtime type checking.
* Racket has a sophisticated contract system that allows you to enforce "type-like" properties at runtime very easily (e.g., you can say "This function should behave as an ((int -> int) -> int) function" and it will do all the necessary runtime checks to make sure that contract is honored as your program executes)
* It also has an optional modern type system, Typed Racket, that you can opt into on a per-module basis. Typed Racket modules can interact with untyped modules safely via contracts. The Typed Racket type system was designed specifically so that it's easy to migrate untyped, idiomatic Racket code to the type system, so you can write untyped Racket code idiomatically, and then go back and port your untyped module to Typed Racket with a minimum of fuss and get the benefit of the type system.