Raynes / fs

File system utilities for Clojure.
453 stars 119 forks source link

Boolean functions should return false when nil is passed in #61

Closed snowell closed 10 years ago

snowell commented 10 years ago

Currently they throw an unhandled NullPointerException. Returning false makes more sense since nil doesn't exist, isn't readable/writable, etc.

Raynes commented 10 years ago

Hey there! Thanks for the contribution. Sorry for how long it took me to get to it. Hasn't been my week. :)

I decided to go about this slightly differently. There isn't anything wrong with your version, but I wanted to remove some duplication so I did this with a very small, simple predicate macro that lets us avoid having to have the same if over and over again!

This was a good idea and is a nice step towards my goal of making the API be consistent.

Cheers!