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

> let us have some symbols n and f and you will now have to read the rest of the text to try to figure out what they are...

This point is mostly relevant for mathematics. When you define a variable in a program the reader can easily infer the type by the value it was initialised with. Sure, if you just see "10" you don't know if it's a byte or a long int, but that doesn't matter because only the compiler needs to infer those details. For reading the code it's enough to know it's an integer. I agree about complex types, though. In Python and pure JS it gets really complicated when you have to find out about a dictionary's/object's fields by looking at code inserting them one by one.



>When you define a variable in a program the reader can easily infer the type by the value it was initialised with.

This breaks exactly when you're dealing with more than one function. Then you have to guess the types of the whole chain of functions.

And maybe that function is used in multiple places, now you need to guess the types of all the places where this function is used.




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

Search: