This is a great question. Wow, that was a long time ago that I wrote that code. A lot has changed since then.
At the time, I never intended anyone to use that variable. It was not part of the spec, which included a lot of functions but no sets. You’re free to use it, of course, but notice in the course I never mentioned sets. And because I recommended using
:use, then anyone defining their own
scoopables would have to deal with collisions, which I wanted to avoid.
I’m all for people going off the track, and of course asking questions. Thanks!
@brunchboy is right. There’s no coding standard for using underscores. I made it up.
As for using
:use, it was still common at the time I made the videos. Now it is not common.
(:require [bakery.core :refer :all]) is better, and giving something a namespace alias
(:require [bakery.core :as bakery]) is preferred. However, I did not want to go into namespaces so soon.
And about using
contains? on a set. @brunchboy is right that it is unnecessary since sets can act as functions. However, I like to use
contains? because it calls out what is going on. At that point in the program, it’s hard to know what
_scoopables is, so treating it like a function might add to the confusion.
Thanks for the great question!