-def sayHi()
Or
def- sayHi()
I feel like having a minus communicates the intend of taking the declaration out of the public exports of a module.
-def sayHi()
Or
def- sayHi()
I feel like having a minus communicates the intend of taking the declaration out of the public exports of a module.
https://clojuredocs.org/clojure.core/defn-
In Clojure this isn't syntax per-se: defn- and defn are both normal identifiers and are defined in the standard library, but, still, I think it's useful precedent for helping us understand how other people have thought about the minus character.
it feels more natural to me to explicitly manage what gets exported and how at a different level than the keyword used to define something. i don't dislike rust's solution per se, but if you're someone like me who still instinctually does start-of-line relative searches for definitions, suddenly `fn` and `pub fn` are separate namespaces (possibly without clear indication which has the definition i'm looking for)
sub EXPORT() { Map.new: "&frobnicate" => &sum }
would import the core's "sum" routine, but call it "frobnicate" in the imported scope.Note that the EXPORT sub can also be a multi, if you'd like different behaviour for different arguments.