Hacker News new | ask | show | jobs
by TazeTSchnitzel 4113 days ago
> That means that my function can have a parameter defined as an int in its strict file, but if it's called from outside of it, anything can still be passed to that parameter, right?

Not at all. It's "weak" typing, not no typing.

A small set of convertible values can be passed and will be converted to the type you asked for, while other values error as usual.

See the rest of the RFC.

1 comments

You're right, I see that now. That's why they went into describing type conversions too. Thanks for the insight!