From Twitter: Maybe we have to face it: Clojure has nothing to offer web programming that is better enough to make people switch to Clojure


#21

I think there are a number of things to consider here. First, this is not a zero sum game. Clojure does not need to outcompete every other language out there to be successful. It just needs a community that’s big enough to make it sustainable in the web dev space. Personally, I think we already have that right now. There are plenty of people actively using Clojure for work, and the ecosystem is very robust. In short, I don’t think Clojure is in danger of going anywhere in the foreseeable future.

Another factor in favor of Clojure is that it piggy backs on the host platforms it targets. Any exciting developments that happen in Js or Java are immediately available to Clojure developers via interop. For example, when React came out, it was immediately usable from Clojure and we now have a whole ecosystem around it. David Nolen gave a good talk on this topic https://www.infoq.com/presentations/language-runtime

While some people worry that Clojure isn’t moving fast, I think that’s actually a good thing. Clojure is already ahead of most languages conceptually, and the developments we see there are really playing catch up to what Clojure was doing by design. In other words, activity is not a direct indication of language quality.

Finally, I do think that Clojure has plenty to offer in the realm of web programming, and many people who give it a serious shot end up sticking with it. The problem tends to be in getting people to actually start using it in the first place. In my view that’s the fundamental problem with Clojure adoption, and it will be a problem regardless what domain we target.

There are two things working against Clojure here. First, the syntax is very different from what people are used to, and that ends up being an instant barrier. Since most people aren’t familiar with structural editing, they end up trying to balance parens by hand and end up being frustrated by that. The second factor is that Clojure is a functional language, and this is not a paradigm most people are familiar with. So, you have a language that feels very different, and it’s not obvious why it might be better than whatever people might already be using. I think this is the problem we need to tackle as a community if we want the language to become more popular.

We need to clearly articulate what problems Clojure solves for somebody using languages like Java, Js, or Ruby. We also need to improve documentation, provide better error messages, and have an editor that just works out of the box with a REPL driven workflow.

Basically, we need to remove as much friction as possible for the newcomers. People shouldn’t be mired in getting their environment setup, fighting with understanding arcane errors, or hunting through outdated blogs to figure out how to do basic things. They should be able to focus on the fun stuff like live code evaluation that would give them a good first impression.

The reality is that Clojure is competing against many other languages, and people only have so much time in a day. If the benefits of the language aren’t obvious, people will go and try a different one where the benefits are more clear.


#22

This is the first time I’ve seen Coast. It’s seems very Rails-like, and might well appeal to those who are looking for something of that nature.


#23

Coast is really new, I just open sourced it I think a week ago maybe? It’s really early days. There’s definitely a lot of work to do to show how coast is as good or better than mainstream web dev frameworks. A few things I’m working on to make it more appealing to clojure-curious devs:

  • Screencast on homepage showing how easy it is to get started with cursive and start evaluating things in the REPL.
  • Better design
  • More docs, so much documentation that it overwhelms people, but still has a quickstart
  • If anyone, anywhere has any questions, go out of my way to answer them

#24

I am a green developer. I have played around in many programming languages over the years, accomplished whatever I needed accomplished – But Clojure is the first language that hooked me and kept me coming back…

I suspect that folks like me are a pretty good target audience for growth – Developers with lots of experience are often set in their ways, and will nearly always default to the tools that are accessible to them. But those of us who are green are going to learn to love whatever we first learn to be productive in, Clojure is definitely a productive language… So a good beginner experience is very important.

ClojureScript isn’t easy to learn. The Clojure is the easy part… It’s the javascript interop that makes me feel like I need to learn two languages to be productive in one. The diversity of tooling also makes it difficult to grasp exactly how everything works and needs to be set up… Lots of choices too - Lein or boot, figwheel, devcards, Reagent, om, reframe, compojure, bidi. It seems like most of the material out there attempts to explain things, but they assume too much and it’s easy for a beginner to get lost.

Getting some cohesive resources regarding what choices need to be made and how they fit into the context of the entirety of the programming experience would help a ton. Writing Specs may allow for some much improved error messages.

I do think that Clojure instills a lot better discipline in the way thing are done - out of that more reliable and maintainable software will emerge. It’s worth it.


#25

I find that Clojure appeals to both junior and senior developers. Once you’ve worked enough with imperative/OO languages you start seeing the problems, and you recognize the benefits that Clojure brings to the table.

I agree with the problem of having too many choices, and that’s been primary motivation behind Luminus. The goal of the project is to combine a project template that provides some sane defaults combined with consistent documentation. For example, if you wanted to make a project with re-frame and sqlite, you can just run:

lein new luminus myapp +re-frame +sqlite

This will setup everything for you, and you can start working on the app immediately.


#26

I agree with this point. When I was learning Clojure with no Java background, I always think Clojure docs fails to make it a independent language for learners. I had to get familiar with some pieces from Java ecosystem before running Clojure. However some of the pieces are not even documented in Clojure docs. So I just want it to be simpler, i.e. with less invisible dependencies.


#27

Just listened last night to the defn podcast with Zach Oakes.
LightMod seems nothing short of amazing for when you’re starting out (repl, full-stack, single install, parinfer).

https://sekao.net/lightmod/


#28

When I was starting functional programming with Scala, it was hard because of the paradigm but also all the syntax and different rules.

There are few things that helped me noticing, starting and persisting :

  • PlayFramework which is the Rails for scala. It was by far the most popular web scala framework. You would start with a sbt new something and you were up and running. For free I had auto reload, error overlay a la react and figwheel (which is very nice for beginners) and some nice templates with DB access examples etc … The nice thing is that I didn’t feel lost about what frameworks to choose. It was just way better and popular than others.

  • Big companies were using Scala and talking about it - Twitter, LinkedIN etc … while developing open source tools using it.

  • Scala Frameworks had a lot of tractions outside of the Scala community: Play, Akka, Spark. The 2 first being now part of TypeSafe/Lightbend “official” stack

I think that those 3 points are necessary.
Hello worlds in repl are not sufficient but Hello world web stack with client side repl to quickly show you can interact with your live code is interesting.

Regarding point #3 I’m not sure what is currently popular outside of clojure community. Popular enough that other language would want to add wrapper around it.

When you have #1 and #3, something like https://developer.lightbend.com/start/ should be interesting.


#29

Great points! We should continue to encourage the library approach. It reminds me of the adage regarding frameworks that they make it easy to do easy stuff but impossible to do hard stuff.


#31

I came from a full-time Laravel/PHP job to Clojure. That experience showed me what I was doing in PHP in the first place! I remember learning about Ring a short while after getting basic syntax down, and couldn’t believe what I’ve (and the PHP world) have been doing with all those SymfonyHTTPRequest classes (I think nowadays it’s even worse with PSR-7 Request/Response classes), which Laravel wraps again.

I found myself constantly struggling to compose functionality around those, stuff that struck me as very trivial with a plain request map from Ring. From that point on, I discovered that there wasn’t actually much to learn to get from Clojure beginner to intermediate – there were years and years to unlearn. After getting basically all of the PHP world stuff “out of my system” I could start to learn new/higher concepts that weren’t even on my radar before (SCIP etc.).

I for one am super grateful to be able to learn Clojure, learn about LISPs and realising that there are functional concepts and constructs for things which the JavaScript community is just now catching up to (e.g. anything in the React world, or something like Michel Weststrate’s immer library).


#32

Hi all,

I am a newbie to Clojure/Clojurescript and the clojurescript quick start at (https://clojurescript.org/guides/quick-start) is awful. It isn’t really a quick start - its more like a gentoo build linux-from-source guide and scares everyone away since it is the most complicated, error-prone and really long way to get anything running. IMHO, the quick start should demonstrate use of lein/figweel immediately and then link to a ‘from fundamentals’ approach later. Please look at the quick start of other languages/frameworks. To get done anything in Clojurescript requires reading a tonne of wiki pages across several projects and google searches. No developer is going to do that today - they will simply give up.


#33

Hi! Interesting… could you please point explicitly to those parts of the quick start which you find confusing? I’m trying to understand where exactly it makes things harder, so probably we can improve it.


#34

You can try lein new reagent foobar && cd foobar && lein figwheel. That’ll give you something super quick. Then open “http://0.0.0.0:3449” in your browser.

Btw, the QuickStart will be overhauled pretty soon since a new CLJS version will make compiling a simple snippet much simpler. Though I think it might also depend on tools.deps.alpha which itself will have to be installed (so another step).


#35

Here’s my observation: the Quick Stack guide tries to make people understand how things work. It’s not wrong. But that’s not how beginners learn things. Beginners want to get things done and make the steps repeatable, in some cases without understanding how it works internally.

So, can these steps listed in the page be finished in 30mins before a beginner get tired? Can those steps be remembered after following those steps for 1 or 2 times, with help of code snippets and project templates?


#36

Tooling is quite complicated for beginners, i am not a full beginner but i find lein confusing , specially after looking at so many ways to configure project.clj , i still ask ok where would this :xyz_option [Some option] go now? Am i doing it right? And there is no good documentation on it either. One can have many level nested options and deps one cancelling other. It is confusing.

So yes i agree things should have simpler repeatable steps.


#37

the marketing is awful

I can’t stress this enough.


#38

Marketing a language like clojure is not easy job. How do you sell a language with carefully designed STM and concurrency facilities to less experienced developers? Most web developers don’t need to solve and thus aren’t familiar with the problems Clojure was invented to solve.

IMO Clojure will not die out due to slow adoption. There will always be a steady stream of senior backend developers who will rediscover Clojure after being burned by super complex stateful behemoths or microservice-madness.


#39

Good point. But I think that’s not conflicted with “making Clojure easier to learn and to use for new developers”. JavaScript and Java are complicated languages, it doesn’t stop people learning them.


#40

I’ll say here what I said much more long-windedly in the other thread of this general topic and shape: Clojure(script) isn’t successfully selling itself (to the JS community especially) as “a better mousetrap”, because it’s not “a better mousetrap” - it is fundamentally a way of living that no longer concerns itself with the capture of rodents. Working in Clojure is, in and of itself, a superior experience to working in the native languages of its host platforms, so much so that the work itself is the comparative advantage.

In the same way that no matter how many of them come out, and no matter how creatively they are named and marketed, a JS frontend framework will never give a developer the same experience of flow that can be achieved at the REPL, I contend that no Clojure framework or marketing website can effectively communicate this sense of flow, of joy even, that the working Clojurist enjoys to an audience looking for a new framework to solve the problems they face living in the tar pit.


#41

So many times this! Aside from Emacs story, from which I could get productive in minutes using Cursive, I couldn’t get happier with the Clojure FullStack experience.

Also, c’mon Rust docs is something to keep an eye into, Clojure could benefit so much from a cleaner awesome one too.

Also I’d like to add here https://clojurecademy.com has the fundamentals to be the Learn RUST.
Add parinfer for begginers and some more Docs/Cheatsheet integration to the delightful beginner welcome.

We have the tools, we have the learning, heck even purelyfunctional.tv could be added.

IMO the fundamental step is, WE NEED A CLOJURE.ORG REDESIGN TO BRING EVERYTHING TOGETHER.
We must link everything Clojurians Slack, Clojureverse board, Reddit board etc etc.
And c’mmon, the site looks from 1997, and nothing is quite pleasent or vibrant.

Tom and Rich Hickey please, let the community overhaul it.

(Clojure Academy REPL working with instructions on the side, quite awesome for new commers)


What would Clojure/Script gain from being more attractive?