>> Should be expressed as:
>> (swap! :atom a, :function inc)

One of Rich's talks on simplicity actually addresses that. He states that
the above method (with keyword arguments) is actually simpler, but that
this isn't exactly easy to program.

And yes, I would take this same position about positional vectors being a
type instead of a list or persistent vector. Same thing with Ratios we
could represent them as [numerator denominator] but we don't as its simpler
to give them their own type, and then I can easily determine if a [11 22]
is a ratio, a 2D point or even a variant.

Types are good even in dynamic languages, we should use the more. As
mentioned by Thomas, records are the idiomatic way to store typed
information in Clojure. They're simple, elegant, and interop very cleanly
with the rest of the system. So that's why I react when someone takes a
conference talk as an example of "the way it should be done". The above
video is a exploratory explanation of a different way of thinking of data,
but I have never seen code like that in production, and it's so different
from idiomatic Clojure, that I would be hesitant to adopt it wholesale.

Timothy

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