Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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.



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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: