This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-09
Channels
- # beginners (376)
- # cider (7)
- # cljs-dev (4)
- # clojure (96)
- # clojure-dev (7)
- # clojure-finland (2)
- # clojure-spec (1)
- # clojure-uk (15)
- # clojurescript (54)
- # cryogen (1)
- # defnpodcast (2)
- # docs (4)
- # emacs (1)
- # fulcro (2)
- # hoplon (15)
- # lumo (19)
- # off-topic (28)
- # om (3)
- # pedestal (2)
- # portkey (6)
- # proton (2)
- # re-frame (34)
- # reagent (4)
- # ring (3)
- # spacemacs (5)
- # unrepl (3)
@fellshard I am confuse son
When the rest of the language spins on the assumption that object literals can be sprinkled liberally
Seeing something like {x: 1}
, I assume object literal, not function block-label-value-return undefined.
I write a lot of unbraced arrow functions (I'd say that something like 80% of the code I write is basically unbraced arrow functions, and I'm trying to get better) and while it bites me occasionally it's easy to catch.
Every year, JS: "How can we implement useful features in the most inconvenient way possible?"
@fellshard Yeah, I feel that way a lot myself š
I think it's possible to write pretty reasonable JS- there's actually a kind of acceptable, if inferior, Lisp in there if you cut away as many of the unfortunate bits as possible (though there are fundamental aspects of underlying semantics that are just irreparably broken, IMHO.)
Writing reasonable JS is actually what drove me to Clojure. While I do agree itās possible to write JS in a functional style (not to equate āreasonableā with āfunctionalā, butā¦), the syntax (and inextensibility) does make it difficult/verbose.
In my case, I ended up writing a lot of my code with Ramda (a FP library in JS), and found myself driving further and further away from āidiomatic JSā
My code was still javascript, but I was using Ramda absolutely everywhere to manipulate immutable data
At that point you start to doubt the benefits of writing javascript. The argument that another javascript dev could pick up your code doesnāt hold anymore
But if you do want your code to be fully functional, immutable, etc, I feel the learning curve of doing it in javascript is similar to learning Clojurescript, and will lead to much worse code