Hi Stuart H!  Comment on:

(defn set-system-properties
  [settings]
  "Set some system properties. Nil clears a property."
  (doseq [[name val] settings]
    (if val
      (System/setProperty (as-str name) val)
      (System/clearProperty (as-str name)))))


What if that were:

    (if (nil? val)
      (System/clearProperty (as-str name))
      (System/setProperty (as-str name) (as-str val))

The change allows:
1. Using boolean false as a value (converted to the string "false")
2. Using keywords/symbols as values.


Also, get-system-property could support multiple arities:

(defn get-system-property
  ([stringable] (System/getProperty (as-str stringable)))
  ([stringable default] (System/getProperty (as-str stringable) (as-
str default))))


-Stuart S

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

Reply via email to