I look at side effects this way, will it ever record some state change that 
some 
code in the universe will eventually rely on ?

If no, then there's no state change/side effect to care about.

Sending a message is a side effect (a pgm will eventually use it), writing to
a database, ... qualify.

Changing a screen output which has no long term memory of what is written to it
and is meant to communicate with carbon entities is not to me a side effect.

A GUI to me is merely a way to present some state information, not a state
by itself. It can always be constructed back again.

So unless we evolve to some silicon dice life form, this rule helps
me segregate what is a side effect from a code standpoint :)

That may help,
Luc P.

> 2014-07-10 19:10 GMT+02:00 Softaddicts <lprefonta...@softaddicts.ca>:
> 
> > The fn that does the display is the one having side effects.
> > Now if your look fn creates the side effect, it should reflect that in its
> > name.
> >
> 
> ​Look discribes the current location. So it has a side-effect, but as I
> understood from others it is not about side-effects, but global state. That
> does not change, so I should not use the '!'.​
> 
> 
> 
> 
> > But... I wonder why it does so. Looking at something does not change state.
> >
> 
> ​No, it does not change state, but it prints the description. So it has a
> side effect. It is not pure, but it is idempotent.
> 
> -- 
> 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.
> 
--
Softaddicts<lprefonta...@softaddicts.ca> sent by ibisMail from my ipad!

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