I'm more or less a newcomer to the language, but I generally feel that 
having to deal with eventual exceptions, such as in

> [...] imagine some code that tried to construct a set literal from some 
variables, catching IllegalArgumentException to deal with duplicate values. 

is not very much in line with how the language is normally designed to 
flow. Coming from different languages I realized early that the fact that 
(first nil) didn't throw an exception (like some equivalent code in Python 
would) is great for simplicity and composition.

At the same time abusing exceptions to handle code branches is ok only when 
there's one of them, but they tend to pile up quite easily, especially in 
a succinct language as Clojure.

(swap! revert-to-12 inc)

Luca


On Monday, August 6, 2012 2:24:31 PM UTC+2, lpetit wrote:
>
> Fwiw, inc on what Marc said 
>
>
>
> Le 6 août 2012 à 10:39, Peter Taoussanis <ptaoussa...@gmail.com> a écrit :
>
> Just throwing in my vote here (assuming anyone's keeping count): I agree 
> with Mark that the current behavior is surprising and disagreeable.
>
> And while there's clearly a practical argument to be made from both 
> perspectives, my own feeling is that throwing a hard runtime exception here 
> is excessive and therefore un-Clojure-like behavior. Granted, that's 
> obviously highly subjective ;)
>
> Anyway, I think he's done a good job of teasing apart some of the apparent 
> history behind the current approach - and it seems to me that there are 
> clearer advantages in removing this error than in keeping it. I appreciate 
> that Clojure generally gives developers the benefit of the doubt, and I 
> guess this feels to me like a place where that is possibly being given up 
> for apparently no major benefit.
>
> So barring any further revelations, yes to this:
>
> Put hash maps and hash sets back to the way they were -- they worked 
>> perfectly fine.  Use the duplicate key check in ArrayMap to make ArrayMaps 
>> behave like all the other maps, i.e., last instance of a key wins.
>
>
> Cheers :) 
>
>  - Peter Taoussanis (@ptaoussanis)
>
> -- 
> 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
>
>

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