r/Clojure • • Dec 18 '18

Clojure 1.10 error messages

http://insideclojure.org/2018/12/17/errors/
92 Upvotes

23 comments sorted by

View all comments

Show parent comments

1

u/joequin Dec 19 '18

I quit using clojure, in part, because of how annoying that was. I honestly can't believe it took this long.

3

u/aptmnt_ Dec 19 '18

Hope this change entices you back!

4

u/joequin Dec 19 '18 edited Dec 19 '18

Clojure is the best dynamically typed language I've ever used, but it's still dynamically typed and for me, that's a deal breaker.

I'm still really glad I learned it as the first language I bought myself while I was in college. The lessons I learned from it have helped me when programming in any language. It taught me the value if immutability and pure functions whenever reasonable. Those principles are helpful no matter what you're working with unless you need extreme performance, which is very rare.

But I do find statically typed languages much easier to use when working with other programmers and when using libraries. It's often easier to work on a project by myself when it's statically typed. There's fewer things I have to keep track of in my head when the compiler and editor can use types to help me.

3

u/64BitChris Dec 19 '18

Have you tried spec yet? I have found it to be much more powerful than the type systems I'm familiar with (Java, Typescript, etc.)

Spec has kept me with Clojure because I agree with your points about type systems, but like I said I find spec to me much more powerful.

2

u/joequin Dec 19 '18

I haven't. It was very very early on in it's development when I stopped using clojure.

How well does it work in practice when working with popular libraries? Do they usually define specs?

2

u/64BitChris Dec 20 '18

That's a great question. It's hit or miss and I'd say a lot of the libraries I use don't have specs because they're older.

However, I usually build my own layer around calls to those libraries and I can add specs there - and then with generative testing I can through test the abstraction before sharing it with others.