The reason for typing so much is maintainability. I'll have to come back to this code again and again over a period of years and there's no chance in heck I'll remember anything I did before. So I've learned that using clearer variable names, even with a little extra typing, is a price worth paying.
On Feb 17, 10:46 am, David Nolen <dnolen.li...@gmail.com> wrote: > (defn months_in_business > "The total number of months we will be in the business of renting out > our home" > [:keys [Months_To_Find_Tenant Months_In_Lease Lease_Cycles > Months_To_Sell]] > (-> (+ Months_To_Find_Tenant Months_In_Lease) (* Lease_Cycles) (+ > Months_To_Sell))) > > -> > > I have no idea why you want to type this much: > > (defn months-in-business > [:keys [mtft mil lc mts] > (-> (+ mtft mil) (* lc) (+ mts)) > > But how do we know what these abbreviations mean while we develop our > application? Write a couple of helper functions: > > (defn map-to-humane-repr [m] > (let [ok (keys m) > vs (vals m)] > (zipmap (map mappings ok) vs))) > > (def *dummy* > {:mtft 1, > :mil 24, > :lc 5, > :mts 12}) > > (map-to-humane-repr *dummy*) -> > > {"Months to Sell" 12, > "Lease Cycles" 5, > "Months In Lease" 24, > "Months To Find Tenant" 1} -- 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