On Jun 19, 2010, at 4:12 , Rich Hickey 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?

- 42

I totally and wholeheartedly disagree, as long as there is a chance something 
goes wrong, and here is a lot of it, the default can not be we force people to 
know more - for example that they explicitly need to box things. And it is not 
even about longs and BigInts, doubles and Floats or what the java version means 
also come into play, how often do you mixed calculations because initializing 1 
is shorter and more used for you then 1.0? This will now break your loop, make 
it crumble into dust and give you odd, unexpected and wrong results.

Lets get away from the argument already cast and bring a new one. It is an 
impossible situation that the literal 1 in one place has a different meaning 
and behavior then in another place. This is in fact a show stopper, I'm 
serious, this would be worst then java.

(* 1 0.2) -> works fine

but

(loop [n 1 r 1](if (zero? n) r (recur (dec n) (* r 0.2))))

does not because the 1 there is not the 1 in the upper example, that is so 
utterly wrong and horrible please think about it and think about how you'd sell 
someone he has to know where a literal means what, I can guarantee you this 
will keep many people from this wonderful language :(.

The default case for a language has to be the most intuitive version otherwise 
you end up with a mess of complex rules and special cases. It was said before, 
this is premature optimization in it's worst since it is forced on the user if 
they want or not. The priority has to be 'it works' later if it matters we can 
worry about 'it is fast' but this isn't working any more. 

Regards,
Heinz

-- 
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

Reply via email to