Hacker News new | ask | show | jobs
by thaumasiotes 2741 days ago
Didn't Clojure change the + function (hardly obscure!) from automatically updating ints to bigints and therefore never overflowing to throwing an exception if you added ints that were too big?

I've got a Clojure book with a spirited defense of why it's good that the simple symbol + just does what you'd expect instead of throwing exceptions based on an implementation detail, and it kind of falls flat now.

2 comments

That was over 7 years ago, so not particularly recent. And you can get the auto-promoting behavior with +' instead.
Yes, very early in Clojure's life and only after testing the change across several popular libraries.