Veit Heller
Veit Heller
Funnily enough, I think that flag was introduced somewhat recently by @scolsen to address bugs that were creeping in; I can’t seem to find the PR and/or issues it addressed...
I guess you could also leverage `profile.carp` to always `(use Dynamic)` if you wanted to, making this a configuration rather than a design issue (that we could also document somewhere).
Thanks for that write-up, that makes sense. I’ll make sure to get your input when I get to work on exposing envs in Carp again (unless someone beats me to...
> Is that https://en.wikipedia.org/wiki/Ad_hoc_polymorphism ? Not quite. Ad-hoc polymorphism is closer to what we do with interfaces, since multifunctions aren’t really overloaded in the sense of polymorphism, if that makes...
> What about something like: > > ``` > (defnmulti add > [a] (inc a)) > (defnmulti add > [a b] (+ a b)) > (defnmulti add > [a b...
> Would the multiple declarations make it easier to implements defaults by referring to itself? > > ```clojure > (defnmulti get [url params] > (curl url "GET" params)) > (defnmulti...
> It does discard any possibility of auto-currying our functions, right? (not sure we'd want that, but still...) I think it would not necessarily, since auto-currying would require us to...
> But wouldn't it be better to have multiple declarations, so you can augment behaviour in a separate file? That’s an argument for a separate form indeed. Which of the...
Alternatively, we could also use metainformation on symbols to take care of how we construct binders, which would take care of all of this. Then all of `defn` and `defnmulti`...
I think that’s also a good idea; it seems like it would be strictly less powerful and a subset of functionality (since you can implement default arguments with variadic functions,...