News for hackers. Stuff that matters.
Re:The Land of Lisp by hcarvalhoalves on Friday October 06, 2017 @08:02PM (#15421372)
> run-time contracts and things like Clojure.spec come about to help fill the void of static typing

If you look at clojure.spec as a replacement for a type system, you'll be frustrated. The focus is on expressiveness, not proof. It's quite a different beast.

The leverage comes from the fact specs are data, and therefore usable at runtime, which usually isn't possible due to type-erasure.

Not having a chasm between compile-time and runtime allows extending the language. You can run clojure.spec checks, or a full type system (like Typed Clojure), etc. The entire mindset is based on "there's only runtime".

The discomfort comes from comparing that to a language that has a canonical type system, and evaluates type definitions in what is essentially a separate runtime only available in the compiler. Apples, oranges.

There are no comments on this comment yet.