Live data from Hacker News

ClojureScript 1.10.844

clojurescript.org

11–20 of 74 posts

Re: ClojureScript 1.10.844

#11
post #6

For those with experience, would you say that ClojureScript for frontend stands on its own without a Clojure backend?

Absolutely, shadow-cljs is all you need, it's not coupled to the Clojure ecosystem, it uses NPM. I'm actually working on a project that uses clojurscript on the backend which is just a `:node` build target in Shadow.

Re: ClojureScript 1.10.844

#12
post #2

A bit of an obvious question Elm, Typescript and Purescript all offer Javascript + Types Clojurescript is dynamic, beside the lisp syntax which is arguably cleaner, and offer some nice advantages like homoiconicity What is the real advantage of Clojurescript (?)

You forget Scala with Scala.js, which is fantastic.

https://www.scala-js.org/

Re: ClojureScript 1.10.844

#13
post #9
post #2

A bit of an obvious question Elm, Typescript and Purescript all offer Javascript + Types Clojurescript is dynamic, beside the lisp syntax which is arguably cleaner, and offer some nice advantages like homoiconicity What is the real advantage of Clojurescript (?)

One of the underated aspects is the inbuilt Google closure library https://developers.google.com/closure/library So nice to have a good standard library when using JavaScript My favourite "type checker" is clj-kondo

Yea it's funny how much is in there, between it and the Clojure standard library you basically don't need to go searching for third party libraries.

I needed a debounce the other which was just importing

`[goog.functions :refer [debounce]]`

Re: ClojureScript 1.10.844

#14
post #2

A bit of an obvious question Elm, Typescript and Purescript all offer Javascript + Types Clojurescript is dynamic, beside the lisp syntax which is arguably cleaner, and offer some nice advantages like homoiconicity What is the real advantage of Clojurescript (?)

The question is funny because on the the list of advantages that Clojurescript offers the syntax / language is quite low on the list imo. Clojurescript has the best client-side build tool I have used in https://shadow-cljs.github.io/docs/UsersGuide.html and everyone uses it. Clojurescript targets/outputs Google Closure compatible code which is easily the most sophisticated JS compiler out there. The reason no one use…

“It's basically my perfect version of Javascript. No need to fumble with libraries like immutable.js, no need for additional libraries like ramda or lodash because the standard clojurescript library has everything+.”

This pretty much my view as well. There’s that classic joke comparing two books on JavaScript, the complete language vs. the good parts [0], and you could pretty much just replace the “good parts” book with ClojureScript.

It has everything you need and gets rid of most of the stuff that enables people to write bad code. (Assuming you like functional programming, of course)

[0] https://i.redd.it/h7nt4keyd7oy.jpg

Re: ClojureScript 1.10.844

#16
post #6

For those with experience, would you say that ClojureScript for frontend stands on its own without a Clojure backend?

It depends on what kind of project you are using it for.

Hobbyist/toy project - sure, using shadow-cljs you can do your front end entirely in ClojureScript and make calls out to whatever backend you want

Professional project with ClojureScript backend - sure, you can use shadow-cljs to target both node (using :node target) and the browser which will allow you to utilize ClojureScript for full stack and not have to rely on Clojure

Professional Project with non-clojure(script) backend - no. It would not be worth it to spend resources to learn clojurescript (talent pool of existing clojure devs is small) and not taking advantage of full stack clojure(script) can be detrimental

Re: ClojureScript 1.10.844

#17
post #2

A bit of an obvious question Elm, Typescript and Purescript all offer Javascript + Types Clojurescript is dynamic, beside the lisp syntax which is arguably cleaner, and offer some nice advantages like homoiconicity What is the real advantage of Clojurescript (?)

The question is funny because on the the list of advantages that Clojurescript offers the syntax / language is quite low on the list imo. Clojurescript has the best client-side build tool I have used in https://shadow-cljs.github.io/docs/UsersGuide.html and everyone uses it. Clojurescript targets/outputs Google Closure compatible code which is easily the most sophisticated JS compiler out there. The reason no one use…

Sorry for what might be an obvious answer, but when you say

>because the standard clojurescript library has everything+

do you mean bc it has all those libraries incorporated, or bc it's able to emit the equivalent to native javascript?

Re: ClojureScript 1.10.844

#18
Since this thread/Clojurescript is getting some love I'd like to express something to a hopefully receptive audience:

There was a point where Clojurescript and Javascript sort of walked hand-in-hand during the advent of when React started to make sense in the minds of the community[0].

It felt really exciting because of the cross pollination that was happening between the two languages, Redux felt very familiar, and we have re-frame for clojurescript.

There was a ton of promise with Apollo.js and an improvement on the `connect` functionality by upgrading to a proper query language for getting state into a component versus wrapping functions around multiple `state.some.path` `state.some.other.path`.

David Nolen built om.next around that very idea, it was basically Apollo.js lite, and it was very exciting scientifically but never quite caught on because maybe it was a little clunky. But using datomic pull query syntax to fetch state for use in a component was thrilling. (if you got this far and decided you hate me and your eyes are rolling so hard I get it lol)

And this was all years ago now. All that excitement and progress and effort seems to have been trapped inside of Typescript, and React hooks, and did everyone forget?

0: https://swannodette.github.io/2013/12/17/the-future-of-javas...

Re: ClojureScript 1.10.844

#19

Since this thread/Clojurescript is getting some love I'd like to express something to a hopefully receptive audience: There was a point where Clojurescript and Javascript sort of walked hand-in-hand during the advent of when React started to make sense in the minds of the community[0]. It felt really exciting because of the cross pollination that was happening between the two languages, Redux felt very familiar, and…

Fulcro is getting a lot of love lately and a passionate community of users around it. So no, it's not forgotten, just migrated

https://book.fulcrologic.com

Re: ClojureScript 1.10.844

#20

Since this thread/Clojurescript is getting some love I'd like to express something to a hopefully receptive audience: There was a point where Clojurescript and Javascript sort of walked hand-in-hand during the advent of when React started to make sense in the minds of the community[0]. It felt really exciting because of the cross pollination that was happening between the two languages, Redux felt very familiar, and…

Also: cross pollination is still happening as libraries like Recoil implement some of the ideas sitting in Reframe for vanilla React.

On the ClojureScript side, I would like to see more projects integrating with platforms like Nextjs and Gatsby.

Post reply on HN