Hacker News new | ask | show | jobs
by jondubois 3371 days ago
>> - It requires more planning to do anything

> That's the idea. You think about what you're going to write in a strongly typed language rather than just throwing stuff at the wall hoping that something will stick.

I think this is a valid point for developers who only have a few years of experience but I've been coding professionally for over a decade now - I don't need the compiler to artificially slow me down - I'd rather spend my mental energy thinking about the algorithm/architecture in its purest form without getting caught up in trying to satisfy the compiler's tedious requirements.

For me programming in a typed language is like using software that always asks you "are you sure you want to do this?" every time you tell it to do something. It's OK if you're a beginner, but I just find it frustrating.

I spent many years programming in ActionScript 3 and then Java so I feel like I've given typed languages a fair shot.

2 comments

> I don't need the compiler to artificially slow me down

It's slowing you down because you've written code with errors. Those type errors are still in your dynamic code, you just can't see them.

> I spent many years programming in ActionScript 3 and then Java so I feel like I've given typed languages a fair shot.

I don't think you have, you've missed many wonderful modern type system features.

Algebraic types, for one, aren't present in either of those languages and are massively useful, replacing 'null' (with a type like Option/Maybe) and exceptions (with a Result/Either concept) in many languages that have them.

Not to mention, with a language that has type inference, you don't even have to write the type in many cases, and yet you keep the guarantees of a strongly typed language.

>I think this is a valid point for developers who only have a few years of experience but I've been coding professionally for over a decade now - I don't need the compiler to artificially slow me down

You'd be surprised.

There's a reason that developers after decades of dynamic languages turn increasingly to types (of which Flow and TS are examples in the JS world).