babashka / nbb

Scripting in Clojure on Node.js using SCI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incrementing a keyword

gdw2 opened this issue · comments

Welcome to nbb v1.2.173!
user=> (inc :foo)
":foo1"

Expected: Clojure throws an exception. Clojurescript gives a warning. Maybe the-above is fine?

Yes, in CLJS there's not much we can do. The CLJS compiler gives a warning but nbb is based on SCI which is an interpreter. I recommend using a linter like clj-kondo which will catch this:

Screenshot 2023-05-02 at 19 07 24