Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Joda Time is actually a great example of a library letting you work in terms of values instead of the mutable object disaster that is java.util.Date; it just happens to be implemented in Java itself.

If you can imagine the same benefits of working with stable values applied across the board to all your built-in data structures, that might help.



Is mixing Java classes in Clojure okay? or to some degree it is acceptable but there are gotchas or the do's and don'ts?

Hey, I checked your website just for fun and it says there you can speak Indonesian, awesome :).


Operating directly on Java classes is pretty standard. Of course you have to be very careful when working with classes which allow mutability, (true in all languages, really) but with Joda that's not an issue.

The only thing you miss out on is that Java methods can't be used as higher-order functions.

My Indonesian is pretty rusty; I should probably update it to say that I understand it rather than speak it. =)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: