2014-07-10 18:34 GMT+02:00 Plínio Balduino <[email protected]>: > IMO, ! is used when change any global state. A side effect like print on > screen is not enough to cause a ! in the name. I think that's why the > functions print/println don't have ! =) >
Than I did it in the 'right' way. In the book the where talking about side-effects, but only a change in global state is more reasonable. > On Thu, Jul 10, 2014 at 12:28 PM, Cecil Westerhof <[email protected]> > 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 '!'. >> >> I have functions reset-game! and walk!. But what about a function like >> look? It does not change state, but it displays where you are. So it has a >> side effect. But most of my functions have this. So, should I append them >> all with a '!'? >> > -- Cecil Westerhof -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
