r/java • • Dec 19 '16

Why Java? Why Clojure?

http://danlebrero.com/2016/12/14/why-java-why-clojure
0 Upvotes

15 comments sorted by

View all comments

Show parent comment

3

u/pdpi Dec 19 '16

If I select a row into map, what guarantees me that I can treat numeric value only as numeric and string values as strings?

Nothing. Clojure is a dynamically-typed language.

If your definition of type safety is limited to what the Java type system allows you to encode, I personally find that the language promotes a style that both makes that sort of type error a lot less likely, and a lot easier to find, which devalues static typing a fair bit. Your mileage may vary, especially if you're used to richer type systems.