Hacker News new | past | comments | ask | show | jobs | submit login

Types loudly state what you accept, and what you return, and possibly enforces it.

The real world equivalent is giving plugs specific shapes, so that you don't plug your headphones into a 240V wall socket.

In a large enough team, this is essential to prevent incorrect data from being passed around, and breaking further down the line after causing a lot of damage.




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

Search: