Live data from Hacker News

Clojure Newbie Guide (2015)

clojurenewbieguide.com

11–20 of 43 posts

Re: Clojure Newbie Guide (2015)

#11

I have been a Clojure newbie for over 3 years now and here is why I am still using it: 1. Clojure code makes sense to me : I could go back to Clojure code someone wrote three years ago and I would have no problem in figuring out what the code was doing. With Java or Javascript, unless the code is documented with extreme diligence, the nuance are hard to decipher. 2. REPL based coding makes it easy to get code right b…

What're you using it for? I really like the language, but it seems geared to replace Java for heavy enterprise enterprise applications. A lot of the benefits I hear people talk about sound like they require a large project to be properly noticed.

I've used Clojurescript for a couple toy projects, but it seems awkward to me.

Re: Clojure Newbie Guide (2015)

#12

Here are the reasons I stopped using clojure (a phenomenal language) a year ago, in order of importance: 1. No C/C++ FFI. 2. Lack of a strong type system (clojure.spec almost solves this problem now, but when I quit this didn't exist yet). 3. Horrific startup times: although clojure itself is fast, its startup time isn't. This makes scripting in clojure unsatisfying. And you don't feel like a ninja when it takes 30 s…

If in any case you still feel the same about Clojure, you should try Common Lisp, it has the three things you want:

1. Easy calls to C with CFFI. No Clojure->Java->JNI->C, just straght CL->C.

2. Useful, optional, type system (which can also catch mistakes at compile time with SBCL and other compilers)

3. Very fast startup times.

and many more features like for example an object system that is massively above what Clojure and Java bring to the table, better exception handling, very explícit errors and nice stack traces, it can also compile to JVM if you want, etc.

If you like Lisp, try it. You already learned a Lisp so the jump is easy.

Re: Clojure Newbie Guide (2015)

#13

Here are the reasons I stopped using clojure (a phenomenal language) a year ago, in order of importance: 1. No C/C++ FFI. 2. Lack of a strong type system (clojure.spec almost solves this problem now, but when I quit this didn't exist yet). 3. Horrific startup times: although clojure itself is fast, its startup time isn't. This makes scripting in clojure unsatisfying. And you don't feel like a ninja when it takes 30 s…

1. There is JNI. I made an example project[1] a while ago. I'll admit it's a little involved but it does exist.

2. Spec does solve the problem for me, but I don't really like static typing anyways.

3. I keep Clojure REPLs open for days. I restart if I need a new dependency and for other minor reasons, but startup time is almost a non issue for development. For scripting, you can try Planck, although yeah you lose the Java interop. I love Clojure, but I just don't use it for scripting.

Not trying to tell you you're wrong, just offering some insight into how Clojure could address (or not address) your points.

[1]: https://github.com/jakebasile/clojure-jni-example

Re: Clojure Newbie Guide (2015)

#14
Happy to see there are good learning resources for Clojure.

The more Clojure users out there, the better, since it is a Lisp language, and as more people learn and use Lisp, it will be more easy for them to also able to also use Scheme, Racket, Common Lisp, LFE and the other friends in the illustrious Lisp family.

This, in the same way people can easily learn C, Java, C++, Rust, by knowing just one of those four languages. Once you understand the syntax, it gets really easy.

Re: Clojure Newbie Guide (2015)

#15

I have been a Clojure newbie for over 3 years now and here is why I am still using it: 1. Clojure code makes sense to me : I could go back to Clojure code someone wrote three years ago and I would have no problem in figuring out what the code was doing. With Java or Javascript, unless the code is documented with extreme diligence, the nuance are hard to decipher. 2. REPL based coding makes it easy to get code right b…

What're you using it for? I really like the language, but it seems geared to replace Java for heavy enterprise enterprise applications. A lot of the benefits I hear people talk about sound like they require a large project to be properly noticed. I've used Clojurescript for a couple toy projects, but it seems awkward to me.

I am using it to implement REST services using the Luminus library.

Re: Clojure Newbie Guide (2015)

#16

Here are the reasons I stopped using clojure (a phenomenal language) a year ago, in order of importance: 1. No C/C++ FFI. 2. Lack of a strong type system (clojure.spec almost solves this problem now, but when I quit this didn't exist yet). 3. Horrific startup times: although clojure itself is fast, its startup time isn't. This makes scripting in clojure unsatisfying. And you don't feel like a ninja when it takes 30 s…

1. There is JNI. I made an example project[1] a while ago. I'll admit it's a little involved but it does exist. 2. Spec does solve the problem for me, but I don't really like static typing anyways. 3. I keep Clojure REPLs open for days. I restart if I need a new dependency and for other minor reasons, but startup time is almost a non issue for development. For scripting, you can try Planck, although yeah you lose the…

With cider and clojure-refactor mode, you can hotload a dependency without restarting the repl. It is kind of brittle but when it's working hot damn is it good.

Re: Clojure Newbie Guide (2015)

#17

I have been a Clojure newbie for over 3 years now and here is why I am still using it: 1. Clojure code makes sense to me : I could go back to Clojure code someone wrote three years ago and I would have no problem in figuring out what the code was doing. With Java or Javascript, unless the code is documented with extreme diligence, the nuance are hard to decipher. 2. REPL based coding makes it easy to get code right b…

What're you using it for? I really like the language, but it seems geared to replace Java for heavy enterprise enterprise applications. A lot of the benefits I hear people talk about sound like they require a large project to be properly noticed. I've used Clojurescript for a couple toy projects, but it seems awkward to me.

Clojure is great for any size web app, but I will agree here, I found clojurescript awkward as well.

Re: Clojure Newbie Guide (2015)

#18

Here are the reasons I stopped using clojure (a phenomenal language) a year ago, in order of importance: 1. No C/C++ FFI. 2. Lack of a strong type system (clojure.spec almost solves this problem now, but when I quit this didn't exist yet). 3. Horrific startup times: although clojure itself is fast, its startup time isn't. This makes scripting in clojure unsatisfying. And you don't feel like a ninja when it takes 30 s…

If in any case you still feel the same about Clojure, you should try Common Lisp, it has the three things you want: 1. Easy calls to C with CFFI. No Clojure->Java->JNI->C, just straght CL->C. 2. Useful, optional, type system (which can also catch mistakes at compile time with SBCL and other compilers) 3. Very fast startup times. and many more features like for example an object system that is massively above what Clo…

Chiming in to give Racket a shout out. Good FFI, good libraries, good tooling, good community, good (soon to get even better) performance, subjectively more modern feel than CL, great type story via Typed Racket.

Re: Clojure Newbie Guide (2015)

#19

Here are the reasons I stopped using clojure (a phenomenal language) a year ago, in order of importance: 1. No C/C++ FFI. 2. Lack of a strong type system (clojure.spec almost solves this problem now, but when I quit this didn't exist yet). 3. Horrific startup times: although clojure itself is fast, its startup time isn't. This makes scripting in clojure unsatisfying. And you don't feel like a ninja when it takes 30 s…

I gave up on Clojure despite spending a lot of hobby time on it and moved to Scala because it's simply a much easier language to sell to other engineers and management.

For me the C/C++ was a minor issue since if you're going to the trouble to do it on the JVM you may as well build that part in Java.

Re: Clojure Newbie Guide (2015)

#20

Here are the reasons I stopped using clojure (a phenomenal language) a year ago, in order of importance: 1. No C/C++ FFI. 2. Lack of a strong type system (clojure.spec almost solves this problem now, but when I quit this didn't exist yet). 3. Horrific startup times: although clojure itself is fast, its startup time isn't. This makes scripting in clojure unsatisfying. And you don't feel like a ninja when it takes 30 s…

What kind of programs do you normally write?
Post reply on HN