Fork me on GitHub
#clojure-dev
<
2016-05-13
>
jdevuyst07:05:41

It seems to me that update-in is broken for empty paths in the following way: - (update-in {1 2} [] (constantly 3)) currently returns {1 2 nil 3} - I would expect it to return the number 3 Is this by design? If not, is this something that could still be changed?

hiredman07:05:20

if I recall correctly, the answer I have seen given in the past with regards to this is that the behavior of update-in with an empty path is undefined

hiredman07:05:26

if you search jira for update-in there is a whole list of stuff, http://dev.clojure.org/jira/browse/CLJ-1623 might be a good place to start reading

jdevuyst07:05:06

ah thanks. yeah, sorry, was a bit lazy with my question

hiredman09:05:00

as much as a loath style guides and the like, it might be nice to add some stuff about record usage to http://dev.clojure.org/display/community/Library+Coding+Standards like "use the factory functions" and "never import the record class unless you also require the namespace where it is defined"

bronsa09:05:04

for the last one you could use :load-ns true when defining your record