Re: Could use an error message here? (using `get` on an atom containing a map)

2014-06-15 Thread John Gabriele
On Saturday, June 14, 2014 11:43:46 PM UTC-4, Ambrose Bonnaire-Sergeant wrote: > > Seems unlikely: > http://dev.clojure.org/jira/browse/CLJ-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34820#comment-34820 > > I would write my own get variant, or use

Re: Could use an error message here? (using `get` on an atom containing a map)

2014-06-14 Thread Ambrose Bonnaire-Sergeant
Seems unlikely: http://dev.clojure.org/jira/browse/CLJ-1107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34820#comment-34820 I would write my own get variant, or use something like Dynalint . Thanks, Ambrose On Sun,

Could use an error message here? (using `get` on an atom containing a map)

2014-06-14 Thread John Gabriele
This one took me a few minutes to see what I was doing wrong: ~~~ user=> (def m (atom {:x 1 :y 2})) #'user/m ;; Later on ... user=> (get m :x) nil ;; What?? `:x` isn't a key in `m`? But I *know* it is... ;; Sanity check, for comparison: user=> (get {:a 1 :b 2} :c); Right; `:c` is not a key