Magnar Sveen 🌻 Profile picture
Sep 14 7 tweets 2 min read
Some thoughts on why I do not miss type systems as a #Clojure developer. 1/
Type systems give you more security, in exchange for making your code more rigid. You "lock the code down" with types, and in return you get some guarantees. This is in my experience not a good trade-off. 2/
In many ways it is parallell to gaining security by deploying less often. Maybe the added time spent indeed reduces errors, but the reduction in flexibility and speed is not worth it. 3/
The elobrate on that last point, the reduction in flexibility and speed also reduces your ability to fix errors. So you had better be sure it is worth it.
After almost 10 years as a full time Clojure developer, I still make lots of those silly type mistakes that a good type system would save me from. And then I fix them, usually within seconds or minutes. /5
Sometimes I even deploy those silly type mistakes to production, and they don't look so silly any more. However, frequent releases allow me to correct my mistake quickly. /6
These are trade-offs, but for me I prefer speed and flexibility over rigidity and safety both in my code and in my deployments. That might not be the right trade-off for you, but it's a part of why I still enjoy coding after all these years.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Magnar Sveen 🌻

Magnar Sveen 🌻 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @magnars

Sep 14
Excellent point! This is one strength of types that doesn't really have a good direct equivalent in dynamic languages like #Clojure. I still don't miss types, tho. Why? Here are some of my strategies for understanding code that I'm reading. 1/
I will run the code as part of understanding it. With full access to the runtime in the REPL, I can often answer the question "What is this called with?" by actually calling it and then looking at the data. 2/
It's data! With Clojure you don't usually pass opaque objects around. Everything is represented with data. Maps, sets, vectors, scalars. It is easily inspected, filtered, drilled down into. 3/
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(