This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-04
Channels
- # announcements (9)
- # babashka (5)
- # beginners (50)
- # calva (13)
- # clj-kondo (11)
- # clojure (30)
- # clojure-australia (1)
- # clojure-china (1)
- # clojure-europe (4)
- # clojure-filipino (1)
- # clojure-hk (1)
- # clojure-indonesia (1)
- # clojure-japan (1)
- # clojure-korea (1)
- # clojure-my (1)
- # clojure-norway (2)
- # clojure-sg (1)
- # clojure-taiwan (1)
- # clojurescript (32)
- # conjure (2)
- # honeysql (1)
- # hyperfiddle (8)
- # jobs-discuss (9)
- # leiningen (2)
- # malli (3)
- # off-topic (21)
- # reitit (4)
- # shadow-cljs (10)
- # sql (3)
- # squint (17)
- # tools-deps (14)
That is excellent!
I think this could be very interesting for #cherry / #clavascript
https://twitter.com/jarredsumner/status/1566367757704146949
You could do import { } from './foo.cljs'
clava-immer: a library written in clavascript that offers some core functions like assoc
and dissoc
as used with immer, to produce "immutable" collections:
https://github.com/clavascript/clava-immer
The varargs functions in clavascript currently produce too much boilerplate so clava-immer could be a nice project as a goal to reduce JS output size of
I clarified the purpose of ClavaScript in the README:
ClavaScript is not intended as a replacement for ClojureScript but as a tool to
target JS for anything you would not use ClojureScript for, for whatever reason:
performance, bundle size, ease of interop, etc.
@lilactown @corasaurus-hex I made a temporary commit which allows you to directly get the spread operator:
(defn foo [x ^:spread y] y) (foo 1 2 3) ;;=> [2 3]
I think it's tempting to emit this when people write [x & y]
- the only difference between clojure and clava would be when y is not passed, then in clojure y
would be bound to nil
but in clava to []
if we directly use spread and don't do any other processing.