Welcome! Please see the About page for a little more info on how this works.

+1 vote
ago in ClojureScript by
edited ago by

Hello

derive's doc says:

Establishes a parent/child relationship between parent and
tag. Parent must be a namespace-qualified symbol or keyword and
child can be either a namespace-qualified symbol or keyword or a
class.

But in practice, ClojureScript accepts non-namespaced tag:

(derive :a ::b)
; nil
(isa? :a ::b)
; true

Clojure throws.

Is ClojureScript behavior expected or a bug?

Same question for the derive [h tag parent] form, which seems to accept non-namespaced keyword/symbol for both tag and parent, this time on both Clojure and ClojureScript:

(derive (make-hierarchy) :a :b)
; {:parents {:a #{:b}}, :ancestors {:a #{:b}}, :descendants {:b #{:a}}}

Please log in or register to answer this question.

...