Live data from Hacker News

Clojure at a Bank – Moving from Java (2012)

pitheringabout.com

1–10 of 68 posts

Re: Clojure at a Bank – Moving from Java (2012)

#4
post #2

I always thought critical applications like banking needed compile time type checking. Clojure is neat and all, but it's dynamic.

Most of the times, they don't. Static typing helps with catching certain types of errors long before the compiled code arrives in production but it's just one tiny factor that contributes to overall software quality. Lack of expressiveness or lack of developer happiness can be much more detrimental to software quality than lack of static typing.

Re: Clojure at a Bank – Moving from Java (2012)

#5
post #2

I always thought critical applications like banking needed compile time type checking. Clojure is neat and all, but it's dynamic.

The arguments I've heard supporting this are usually weaker than their proponents think because they simply don't understand the alternative. Even if this is true though, "banking" is much too broad a category to make such general statements. Consider:

> Here are some specifics – our new code is going to be an order of magnitude less in volume than the old and this is being conservative.

Java's static typing would help catch mistakes but it's not magic. And by moving this piece of their system to Clojure, they've managed to simplify it so much that there's much less room for mistakes to hide.

Re: Clojure at a Bank – Moving from Java (2012)

#7
post #2

I always thought critical applications like banking needed compile time type checking. Clojure is neat and all, but it's dynamic.

Ok, then use Prismatic Schema & core.typed. Not to mention other tactics to help correctness, like simulation testing with Simulant. (Or what don't you like about them?)

Re: Clojure at a Bank – Moving from Java (2012)

#8
post #4
post #2

I always thought critical applications like banking needed compile time type checking. Clojure is neat and all, but it's dynamic.

Most of the times, they don't. Static typing helps with catching certain types of errors long before the compiled code arrives in production but it's just one tiny factor that contributes to overall software quality. Lack of expressiveness or lack of developer happiness can be much more detrimental to software quality than lack of static typing.

I second this. I'm currently creating a new dynamic website, which will see around 10k users a day.

We could have done it in a week with rails scaffolding capabilities and the vast gem environment, but we are doing everything manually in Scala, because type safety and performance. It's so frustrating that I'm looking forward to quit very soon.

Re: Clojure at a Bank – Moving from Java (2012)

#9
post #5
post #2

I always thought critical applications like banking needed compile time type checking. Clojure is neat and all, but it's dynamic.

The arguments I've heard supporting this are usually weaker than their proponents think because they simply don't understand the alternative. Even if this is true though, "banking" is much too broad a category to make such general statements. Consider: > Here are some specifics – our new code is going to be an order of magnitude less in volume than the old and this is being conservative. Java's static typing would he…

The verbosity of Java isn't necessary in all statically-typed languages. For instance Haskell is no more verbose than, say, Python, and has an even more expressive static type system than Java.

Re: Clojure at a Bank – Moving from Java (2012)

#10
post #2

I always thought critical applications like banking needed compile time type checking. Clojure is neat and all, but it's dynamic.

Clojure supports strong typing if you want it:

https://github.com/Prismatic/schema

https://github.com/clojure/core.typed

These are both libraries that you can choose to use. Both Typed Clojure and Schema are more powerful than Java's type system. By powerful I mean you can declare types and constraints that aren't expressible in most type systems (eg: an object can not be NULL, or a Map or Array must have specific keys or type'd values). Schema is run-time (we only leverage it in development and testing), while Typed Clojure is more akin to compile time.

Post reply on HN