On Sun, Jun 20, 2010 at 11:30 AM, Nicolas Oury <nicolas.o...@gmail.com> wrote: > I don't believe overflow exception is hard for a beginner. (They know how an > integer is stored in a computer), but they should not need to write any > annotations.
I agree with Nicolas. An overflow says "you did math that doesn't work with basic numbers" and pretty much everybody coming to computers via any path may encounter that from time to time. It's basic stuff. What's more puzzling to beginners is why simple code executes very slowly (compared to Java or whatever). I see this crop up in every single language community that I've been part of. A language that does dynamic magic with numbers causes more complaints about poor performance than any optimized language does about overflow exceptions, in my experience. I would vote strongly against a system where a simple, 'obvious' program failed to compiled / run (for reasonable input) without advanced stuff like type hinting or additional language constructs. If you know you're dealing with big numbers and need to avoid overflow exceptions at the cost of performance, that's a decision you can be informed to make and adjust your code accordingly. I have sympathy with both sides of the argument in this thread and I've gone back and forth over the last couple of days. After seeing all the pros and cons (and now we're seeing a lot of things repeated which suggests the argument may be running dry), I am now firmly in the camp that would prefer performance by default and fewer surprises for folks new to Clojure. That's probably colored by my background where most of the languages I grew up with that shaped my experience gave you overflow exceptions from fact( someLargeNumber ) but they calculated fact( reasonableNumber ) very fast :) -- Sean A Corfield -- (904) 302-SEAN Railo Technologies, Inc. -- http://getrailo.com/ An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood -- 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 clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en