r/programming • • Mar 31 '17

Fourteen months with Clojure

https://blog.skyliner.io/fourteen-months-with-clojure-beb8b3e4bf00
30 Upvotes

6 comments sorted by

2

u/Criptfeind Apr 03 '17

I really enjoy Clojure. Persistent data structures, core.async, and transducers have all been really pleasant abstractions to work with. I've been writing in it for fun and utility for maybe five years now, and have used it for one mid-scale contracting project, so I hope that that's sufficient background to prevent dismissal of the following as the gripes of a beginner, but: it's so strange to me, for all of the appeals that Clojure makes to an interactive development process involving the REPL and immediate feedback, that a first-class debugging experience on the level of Common Lisp's doesn't seem to be on the roadmap at all. The type of explorative developing you do in that environment, with the ability to drop into the debugger on error, alter the function body and restart the frame with your new code, seems about as far beyond the standard Clojure workflow as REPL-based development is beyond the save-compile-fix cycle of less interactive language ecosystems.

I can deal with the Java stacktraces and the occasional mystery of which concrete class is actually backing IPersistentMap after however many invocations of assoc, but if the experience of writing code is going to be a pillar of the language's sales pitch, why isn't this sort of next-level debugging experience on anyone's radar? The CIDER debugger is nice, but it's not CL nice.

2

u/yogthos Apr 05 '17

Yeah, I definitely agree with you there. There's a lot more that could be done with the tooling to make the dev experience more fluid. I think it's an artifact of Clojure still being relatively new, and having a much smaller community than CL though.

Personally, I'm just really happy that it's a viable modern Lisp that I can use professionally today. :)

1

u/pdp10 Apr 06 '17

Not to be a curmudgeon, but what exactly makes Common Lisp something you can't use today? Very obviously the JVM is a convenient runtime target that people understand, but there's more to professional/enterprise/contracted code than that, especially if they let you write in Clojure.

1

u/yogthos Apr 06 '17 edited Apr 06 '17

There's nothing preventing you from writing CL today, but Clojure is a better option for new projects in my opinion. I think the fact that it runs on the JVM/Node.js/Browser is a huge benefit. It's much easier to get a job writing Clojure or to convince your current employer to start using it. Also, being able to piggy back on the existing infrastructure is pretty handy. Personally, I prefer Clojure syntax and its focus on immutability as well.

1

u/pdp10 Apr 06 '17

So employers prefer standardized, older, established languages except they prefer Clojure over ANSI Common Lisp. ;) (Not an argument, an observation.)

1

u/yogthos Apr 06 '17

It's more that employers prefer to keep existing infrastructure in place, and continue leveraging things they already built.

If you're a Java or a Node.js shop, you can introduce Clojure into your current projects, share libraries, etc. You can use exact same build and deployment tools, IDEs, and so on. You can reuse your knowledge of the platform regarding things like performance tuning.

When you switch to CL, you have to do everything from scratch, and it's a much bigger investment for the company. It's always going to be easier to switch to a hosted language on the platform you're using than to jump onto a new platform.