What advantage does using :refer
in :require
have over using :only
in :use
? Are the following synonymous?
(ns so.example (:use [my.lib :only [function]]))
and
(ns so.example (:require [my.lib :refer [function]]))
Main idea of adding :refer
to :require
is to get rid completely of :use
, leaving only one operator to load other packages. You can emulate existing :use
with (:require [my.lib :refer :all])
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With