Re:The State of Java
by prewett on Tuesday September 22, 2009 @12:04PM
(#837258)
Is it only you writing the code? If it's just me, generally the names of my variables imply the type ("price" is probably a float, for example). But say you're joining a project with 100 Python classes. How do you write the code so that someone else will know that the arg named "network" is a ip address string and not a network socket or a class, presumably named "Network"?
[ Parent
| on HN ]
Re:The State of Java
by steveklabnik on Tuesday September 22, 2009 @06:55PM
(#838193)
Funny, my "price" would probably be an integer ;).
Maybe it comes down to documentation. If I were to use some sort of function where I wasn't sure what the argument was, I'd look in the docs to see first.