On Wednesday, September 10, 2014 10:53:27 PM UTC+2, Alex Miller wrote:
>
> On Wednesday, September 10, 2014 11:05:36 AM UTC-5, puzzler wrote:
>>
>> When I explain to new Clojurists what the ! means, I explain that it 
>> calls attention to a mutation function that is unsafe to call inside a 
>> transaction.  Many programmers coming from Scheme are used to thinking of ! 
>> as meaning *anything* involving mutation, but that's not the case in the 
>> Clojure.  This more subtle distinction (that it needs to be unsafe in a 
>> transaction) clarifies why swap! has an exclamation point, but ref-set does 
>> not, even though both involve mutation.
>>
>
> I do not think there is a hard definition of what ! means as a suffix. 
>

" Use the bang! only for things not safe in an STM transaction."
 -- http://dev.clojure.org/display/community/Library+Coding+Standards

AFAICT, that definition was consistently used in the past in core and I 
used it in workshops, too.

And yes, the same page says "Rules are made to be broken. Know the 
standards, but do not treat them as absolutes."  


Just wanted to add this to the discussion
stefan

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to