5 ms·
I hate to harp on this issue, but I tried Clojure for about a year on and off. I just couldn't get over the really crappy stack traces. I would break something
by n72 10y ago
I hate to harp on this issue, but I tried Clojure for about a year on and off. I just couldn't get over the really crappy stack traces. I would break something and then spend 10 minutes tracking down whatever I broke. I'm happy with Kotlin for the moment, but would love to get back into Clojure if only it would get sane error messages.
- hashkb 10y agoIt's that "on and off" that killed you. Dig in, practice, get better, and it will become much less of a problem. Set your goal "I will get better at debugging" and not "I will immediately be a pro".
- hkjgkjy 10y agoI used to think so when I was new to Clojure. Then I realized that the stack traces just show you the call stack - nothing more, nothing less. I realized the thing that put me off was seeing Java stuff in the stack trace. But this is the beautiful thing of Clojures hosted nature. Clojure is just a library, that can be dropped into a project. Thinking about it like that made me appreciate the traces.
- agumonkey 10y agoEmacs cider repl added stacktrace filters that make you feel calm when something pops. I never did anything fancy but compared to vanilla stacktraces it's a great step.
- Myk267 10y agoYou're at least not alone. I used Clojure for a while and we didn't get along despite my attraction to the language, and the hype, I guess. Clojure makes a lot of trade offs to run how it does and where it does and those choices don't necessarily add up to the experience I, or others who seem to crop up here, prefer. While I haven't tried Kotlin, I'm aware of it and know that it isn't all that different from Scala, which is a bit more my style.
- cle 10y agoClojure is designed to be a practical language. Part of that is interop with the host VM (JVM in Clojure's case). The "crappy" stack traces are definitely NOT crappy when you're using Clojure in a complex JVM ecosystem. The raw-ness and simplicity of it is actually refreshing. The Clojure Java source is remarkably simple, and it doesn't take much time to get used to and appreciate the Java stack traces when writing non-trivial Clojure code in a Java world.
- n72 10y agoI just don't see how it's remarkably simple. In other langs with good stack traces I get exactly the error at exactly the line on which it occurred. In Clojure, I quite simply don't. I do absolutely love the rest of Clojure. I also realize there are tradeoffs to being hosted. Nevertheless, to deny that the fact that the stack traces aren't ideal seems a bit of a stretch.
- cle 10y agoI'm not claiming they're "ideal", which is a really loaded word. Just that they're practical, and in my opinion they make the right tradeoffs.
- conaws 10y agoSolving that is what this post is about