2014-07-10 18:46 GMT+02:00 Stefan Kamphausen <ska2...@gmail.com>:

> On Thursday, July 10, 2014 5:28:26 PM UTC+2, Cecil Westerhof wrote:
>>
>> When a function returns a true/false value you should end it with a '?'.
>>
>> Clojure Programming says that with side effects you should end the
>> function name with a '!'.
>>
>
> "Use the bang! only for things not safe in an STM transaction."
> -- http://dev.clojure.org/display/community/Library+Coding+Standards
>
> Side-effects are usually a good candidate for this, but not necessarily so.
>

​Well, I am not a library writer yet, but I take it into account. Still a
'few' things to learn.

The functions reset-game! and walk! change global variables. So that is
correct. The function look only describes the current location, so it does
not need the '!'.

Just to be absolutely sure: a function that writes to (for example) a
log-file does not need the '!'?

-- 
Cecil Westerhof

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