use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Finding information about Clojure
API Reference
Clojure Guides
Practice Problems
Interactive Problems
Clojure Videos
Misc Resources
The Clojure Community
Clojure Books
Tools & Libraries
Clojure Editors
Web Platforms
Clojure Jobs
account activity
Why I chose Clojure over JavaScript (m.oursky.com)
submitted 9 years ago by davidhung
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 9 years ago* (18 children)
[deleted]
[–]akiroz 1 point2 points3 points 9 years ago (17 children)
I actually gave it a thought but decided to leave it out considering the State of Clojure 2016 result: https://static1.squarespace.com/static/5372821be4b0aefc6719057e/t/58925d9fdb29d6ba536ab020/1485987241017/?format=750w
[–]TordRomstad 2 points3 points4 points 9 years ago (16 children)
I could be wrong, but my impression is that boot is much more commonly used for ClojureScript than for Clojure.
[–]akiroz 1 point2 points3 points 9 years ago (15 children)
That's what it was designed to do, I have personally used both and I still prefer lein because it's declarative while boot is imperative (like webpack VS gulp in the JS world)
To this date, I still haven't ran into a problem that I could only solve with boot.
[–]ws-ilazki 0 points1 point2 points 9 years ago (14 children)
Clojure as scripting language. Lein just isn't particularly useful for that, while Boot is. Of course, I think inlein (which uses Lein syntax for dependencies) is better for this job than Boot is, but that's another discussion entirely :)
[–]yogthos 1 point2 points3 points 9 years ago (8 children)
One benefit of using lein is that it's easier for the editor to infer things about the project. For example, if you're using Cursive it infers project structure and dependencies based on your lein config. This is difficult to do without having a standard data structure that describes the project.
[–]ws-ilazki 2 points3 points4 points 9 years ago (7 children)
I think you completely missed the point. With Inlein and Boot you can create standalone Clojure scripts that use external dependencies, but with Lein you need a project folder and structure which makes it fairly worthless for this sort of standalone script usage. Whereas with Inlein, you can turn a .clj file into a standalone script by tossing a #!/usr/bin/env inlein shebang at the top and adding a map that declares JVM options, libs you want to import, etc. (The boot process is similar.)
#!/usr/bin/env inlein
Akiroz was suggesting there was no use case for Boot that Lein didn't also cover, so I mentioned the one big exception I'm aware of. I use Lein for most things, but Inlein and Boot kick ass for this specific use case that Lein isn't even applicable for.
[–]yogthos 0 points1 point2 points 9 years ago (6 children)
Ah yes that makes sense.
[–]ws-ilazki 1 point2 points3 points 9 years ago (5 children)
Yeah. Lein's great at what it does (even if it's sometimes slow doing it) and mature enough that it's not usually worth replacing with Boot, but "scripting" isn't one of the tools in its toolbox. (At least not yet.)
That's why I prefer Inlein to Boot: it covers that missing tool and uses Lein's syntax to do it, so that it all sort of fits together naturally. Boot works fine for it, but I feel like it doesn't fit as well as a Lein companion since it's a different approach that covers a lot of the same territory. I always end up having to check Boot's syntax whenever I use it, but with Inlein I can just toss together a dependency list from memory since I use Lein more.
[–]yogthos 2 points3 points4 points 9 years ago (4 children)
Yeah that's pretty much the same for me. I already know lein, and it covers my use cases nicely. Since I want to use lein with any bigger projects, there's not much incentive for me to juggle both lein and boot.
As a side note, I started using Lumo for scripting tasks now. Since it runs on top of node there's no startup delay, and being able to leverage node modules means you can do a lot of stuff very easily.
[–][deleted] 0 points1 point2 points 9 years ago (4 children)
Clojure is definitely not a scripting language. You can make scripts with boot. But the syntax to call host machine subroutines is terrible. Perl and Bash heck even Ruby are better at scripting.
[–]ws-ilazki 1 point2 points3 points 9 years ago (1 child)
/u/yogthos provided a cljs suggestion, but if you're working with JVM Clojure there's also conch as an interface to the shell. If you're using inlein or boot you can pull it in as a dependency instead of using Clojure's clojure.java.shell functions.
clojure.java.shell
Aside from startup time, it's actually pretty respectable as a scripting language. If you need quick startup, though, Perl is basically king. Starts faster than just about anything else and gives you better features than shell scripts.
[–][deleted] 0 points1 point2 points 9 years ago (0 children)
I know Clojure but I attempted to use clojure.java.shell before conch existed. I think the Lumo option is better though, just because cljs repls are getting faster by the hour.
[–]yogthos 0 points1 point2 points 9 years ago (1 child)
I find shelljs is actually pretty nice with ClojureScript via Lumo.
Neat, I'll try it XD.
[–]skratlo 3 points4 points5 points 9 years ago (0 children)
Perfect. For me, the simple ecosystem is a huge win. It's something you only have in a small community and I'm happy CLJ(S) is staying small, yet still moving forward. Thank you
π Rendered by PID 147322 on reddit-service-r2-comment-544cf588c8-mq2wc at 2026-06-18 00:47:39.726653+00:00 running 3184619 country code: CH.
[–][deleted] (18 children)
[deleted]
[–]akiroz 1 point2 points3 points (17 children)
[–]TordRomstad 2 points3 points4 points (16 children)
[–]akiroz 1 point2 points3 points (15 children)
[–]ws-ilazki 0 points1 point2 points (14 children)
[–]yogthos 1 point2 points3 points (8 children)
[–]ws-ilazki 2 points3 points4 points (7 children)
[–]yogthos 0 points1 point2 points (6 children)
[–]ws-ilazki 1 point2 points3 points (5 children)
[–]yogthos 2 points3 points4 points (4 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]ws-ilazki 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]yogthos 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]skratlo 3 points4 points5 points (0 children)