Structural Typing for Clojure
github.com
Structural Typing for Clojure
1–10 of 14 posts
Re: Structural Typing for Clojure
#2One point to appreciate about this approach is the flexibility in only worrying about the relevant pieces. In my case, I may be worrying about whether a continuous variable has been tagged "datetime", requiring additional processing steps. Merely checking for such tags allows the input data to implicitly direct the flow of the program, reducing the coupling between data and specific processing implementations.
Re: Structural Typing for Clojure
#3Re: Structural Typing for Clojure
#4Not saying it isn't useful, in fact I have a project in which this would be a very good fit and I might even implement it there.
Re: Structural Typing for Clojure
#5Re: Structural Typing for Clojure
#6Important to note that this isn't STATIC typing (which detects errors at compile-time), rather this is more like a validation library to make sure structures have certain properties at run-time. Not saying it isn't useful, in fact I have a project in which this would be a very good fit and I might even implement it there.
This looks like a contract library, which I assume already exists in Clojure. It'd be interesting to see what's unique about this implementation, if anything.
Re: Structural Typing for Clojure
#7Re: Structural Typing for Clojure
#8Speaking as one who is trying to use more functional languages and starting to love Elm.
Re: Structural Typing for Clojure
#9Important to note that this isn't STATIC typing (which detects errors at compile-time), rather this is more like a validation library to make sure structures have certain properties at run-time. Not saying it isn't useful, in fact I have a project in which this would be a very good fit and I might even implement it there.
Re: Structural Typing for Clojure
#10I've had good luck with prismatic schema https://github.com/Prismatic/schema , which seems to be along a similar direction. It's fairly low commitment and can lead to big gains fairly quickly. I assume this would be similar.