top | item 43446598

(no title)

tarcon | 11 months ago

It's more cognitive load to write a validation for every parameter because you can't rely on your fellow dev knowing it's not good to pass a string where you want a boolean.

discuss

order

necovek|11 months ago

I think you misunderstood the article and my comment: this is about introducing new types, not about typing or not typing your function arguments.

javcasas|11 months ago

But new types are wonderful! They can be used to prevent you from adding speed and and fuel left. Yes, both speed and fuel left are floats, but adding them will only produce nonsense.