This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
blog:enterprise_clojure_is_not_a_bad_phrase [2017/05/24 22:49] djo [Retrospective] |
blog:enterprise_clojure_is_not_a_bad_phrase [2017/05/25 16:16] djo removed |
||
---|---|---|---|
Line 63: | Line 63: | ||
===== As complexity increases, the data expected in a function's parameters can quickly become non-obvious ===== | ===== As complexity increases, the data expected in a function's parameters can quickly become non-obvious ===== | ||
- | Even though I had written a docstring for the ''%%merge-strings%%'' function, notice that because this function is a reducer, and is not API, I had not rigorously described each parameter's possible values and usage within the function. | + | Even though I had written a docstring for the ''%%merge-strings%%'' function, notice that because this function is a reducer, is used as internal implementation detail, and is not API, I had not rigorously described each parameter's possible values and usage within the function. |
This week, I decided to use the upcoming [[https://clojure.org/guides/spec|Specs]] library from Clojure 1.9 to document each parameter's possible values and see if this helped with the readability and maintainability of this particular example. | This week, I decided to use the upcoming [[https://clojure.org/guides/spec|Specs]] library from Clojure 1.9 to document each parameter's possible values and see if this helped with the readability and maintainability of this particular example. |