On Sat, Jun 19, 2010 at 3:12 AM, Rich Hickey <richhic...@gmail.com> wrote:
> > I have to say I'm in the 'pay for what you use' camp - you need a box, you > ask for one. If I don't (and neither do any of those loops), why should I > have to do extra work to avoid it? > > Rich > > > +1. It is often very easy to spot integers that can grow above 10^18. Again, > 95% of number variables that someone will write in his life never will attain that because they are somehow referring to a ressource, either in the computer (counter, indices) or in the real world. So, except for scientific programming, fact, fib and ackerman, that's not a problem. (For scientific programming, I argue people should know what to do with numbers). I still would like to have a real world example were it is hard to predict and to solve. On the other hand, having boxed by default is a very significant slowdown (10% on the strange program I tried, that had already a lot of annotations, probably 20% or more on most programs), that can never be addressed : you can't write annotations on every single line of your program. So, we take a 10/30% speed hit, that won't be solved, mainly because we want people writing their first Fib or fact function not to have an exception thrown. I think people can handle this level of complexity. If boxed is the default, I advocate at least a flag allowing to change that (and possibly allowing int as a default for embedded stuff). Most problem with semantic changing flag disappear if the flags have an order. It is close to choosing the size of your heap on the command -line, which is a semantic-changing run-time flag... -- 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