|
|
|
|
|
by dkersten
3144 days ago
|
|
Except that static typing doesn’t help much there either (unless perhaps you’re using Frink with its units). The type doesn’t carry enough information. For example, knowing that something is an integer really doesn’t give you enough context about what that integer means or is used for. If it’s an object or strict, ok, then it helps to document, but if it’s primitive or standard collections... Anyway, in Clojure, we now use spec to specify the shape of data that we expect, with nice descriptive namespaced keyword names. It helps in validating data entering the system, generating test data and as documentation. |
|