2 ms·
Not that you should necessarily use it as a production language, but I'd suggest checking Racket if you want to see dynamic typing done right. `#lang racket` do
by catnaroek 11y ago
Not that you should necessarily use it as a production language, but I'd suggest checking Racket if you want to see dynamic typing done right. `#lang racket` doesn't have static types, but it has dynamically checked contracts with a blame feature that pinpoints at the part of the program that is responsible for a contract violation. `#lang typed/racket` has a more traditional type system (programs are checked before they even run), but the type checker is implemented entirely as a series of Racket macros, and the resulting program integrates seamlessly with untyped Racket code. Regarding refactoring, DrRacket does a pretty good job of identifying dependencies between defined symbols, even across modules. It's true that more popular dynamic languages (JavaScript, Python, etc.) are bad at tracking useful static information, but you shouldn't generalize from this to all dynamic languages.