News for hackers. Stuff that matters.
Re:A DSL in 5 Languages: Ruby, Python, PHP, C#, Java by papaf on Wednesday August 04, 2010 @05:46AM (#1574097)
Just a question of personal taste but I'd have the conditions as functions and have search return a list if I was using clojure...

   (braintree/search
    (starts-with :order-id "a2d")
    (ends-with   :customer-website ".com")
    (equals      :billing-first-name "John")
    (one-of      :status  [:authorised :settled])
    (between     :amount 10 20))
The cool thing being that both styles are possible in a lisp.

There are no comments on this comment yet.