News for hackers. Stuff that matters.
Re:Strong typing, a hill I'm willing to die on by handsaway on Wednesday October 04, 2023 @10:33AM (#37765785)
> Before we can select a function to convert a string into a number we must first pick a numerical type

Except this has literally nothing to do with static typing and everything to do with whether or not the language you're using cares about numeric types.

For instance in typescript you'd just have `number` as the type. You could conceive of a dynamically typed language like python where adding a u8 to a u32 would cause a runtime error. In which case it sure would be nice to have the compiler tell you to convert before you called a function.

>The other problem is that when you write such trivial programs

If only I had a career writing trivial programs that would make a lot of things easier.

There are no comments on this comment yet.