I know a lot of people like to say how unhelpful Java like static typing 
is, and only more powerful type systems of the ML family add value, but 
I've been wondering recently if for Clojure it wouldn't make more sense to 
simply extend the type hints to enable an optional Java like static typing 

It is my understanding that ML style static typing is incredibly difficult 
to add properly and without compromise to a dynamic language. That doing so 
limits the scope of type inference, rendering the task of adding type info 
more tedious then in ML languages themselves.

ML style static typing provide enhanced safety grantees, but seem to add 
too much complexity to Clojure to be practical. What about a Java like 
static typing scheme though?

I haven't found in practice that the safety of Clojure was an issue, as the 
REPL workflow tend to promote quite a lot of testing. So I'm not too 
worried about needing the state of the art of provable correctness for my 
programs. What has been a biggest cause of issue to me was refactoring and 
shared code base across a team. Those last two use cases are actually 
pretty well handled by Java like static type checking. Is it a powerful 
type checker, not really, but it enables most trivial type errors to be 
caught early, and it allows easier integration points for other devs to 
follow, as well as documentation for functions, better tools support and 
easier refactoring, while also enabling performance optimizations.

I have limited knowledge in typing systems, and have no idea how easy it is 
to implement them, but as a user of Clojure, I feel like I would find an 
optional Java like static typing a great addition, one that I am more 
willing to use and benefit from then Typed Clojure's more complex ML style 
type checking.

What do other think?
Can anyone with better knowledge tell me if this would be feasible or if 
adding such gradual typing system is effectively as hard as adding ML style 
type checking?

You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
For more options, visit this group at
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to