Re: Map destructuring variations in Pedestal

2013-03-20 Thread Alan Malloy
Yes. Apparently you can put whatever garbage you want into the `:or` map: each local is looked up in that map to see if it has a default, but nobody ever checks to see if there are unused keys in the defaults map. So `:or {::type :jety}` has no impact at all on the generated code: there is no l

Re: Map destructuring variations in Pedestal

2013-03-19 Thread Sean Corfield
Pretty sure it's just a typo / bug. I think it should read: {servlet ::servlet type ::type :or {type :jetty} :as service-map} On Tue, Mar 19, 2013 at 10:09 PM, Matching Socks wrote: > I'm puzzled by two :or syntaxes that are used in io.pedestal.service.http, > from [io.pedestal/pe

Map destructuring variations in Pedestal

2013-03-19 Thread Matching Socks
I'm puzzled by two :or syntaxes that are used in io.pedestal.service.http, from [io.pedestal/pedestal.service "0.1.1-SNAPSHOT"], which is where following along with the Getting Started got me. In one place, it pairs :or with a map whose keys are symbols being bound in the outer form: {routes