This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-19
Channels
- # adventofcode (5)
- # announcements (1)
- # babashka (44)
- # beginners (83)
- # biff (10)
- # calva (1)
- # cherry (3)
- # cider (10)
- # clojure (78)
- # clojure-europe (12)
- # clojure-norway (1)
- # conjure (1)
- # cryogen (1)
- # datascript (4)
- # dev-tooling (2)
- # gratitude (2)
- # lsp (4)
- # malli (6)
- # off-topic (15)
- # polylith (9)
- # quil (19)
- # releases (1)
- # sci (6)
- # scittle (64)
- # sql (10)
- # squint (35)
It seems like SCI treats foo.bar
and foo/bar
the same. Is this expected?
$ clj -M -e 'clojure.core/inc'
#object[clojure.core$inc 0x5c3b6c6e "clojure.core$inc@5c3b6c6e"]
$ clj -M -e 'clojure.core.inc'
Syntax error (ClassNotFoundException) compiling at (REPL:0:0).
clojure.core.inc
Full report at:
/tmp/clojure-10423880322428291732.edn
$ bb -e 'clojure.core/inc'
#object[clojure.core$inc 0x6f14fb4a "clojure.core$inc@6f14fb4a"]
$ bb -e 'clojure.core.inc'
#object[clojure.core$inc 0x6f14fb4a "clojure.core$inc@6f14fb4a"]
first noticed it in my ys
usage of sci, so tried with bb
and got the same thing
It is because of the mechanism to resolve custom types. Custom types are completely fake in SCI but in clojure they are host objects, like:
(ns foo)
(deftype Foo [])
now foo.Foo
refers to a type. In SCI this type just lives in the foo
namespace but to be compatible it accepts foo.Foo
I could lock this behavior down some more, but I would just consider it undefined behavior that you shouldn't rely on
That's fine with me. This isn't causing me any problems at the moment. Just seemed strange so I thought I'd bring it up.
👍 1