|
|
|
|
|
by quickthrower2
1801 days ago
|
|
I don’t think it’s a loose vs strong type thing. Changing languages and being productive is hard in either direction. I’d say I had the same experience from c# to JS. If you are working in a team types are invaluable unless you have a very disciplined team. The times I’ve worked on team JS or CoffeeScript code I’ve had to read hundreds of lines of code to understand wtf to pass into an argument.
Aaah you want it to be a promise if the first arg is true but a number if it’s false kinda shit. Return type? Sometimes this sometimes that, might be a hydrated object from the wire as-is. |
|
I think my argument certainly falls apart when considering those kinds of teams. Then again I have had the misfortune recently to experience some relatively undisciplined Java teams which creates a different set of problems. So on second thought maybe the discipline argument can go both ways.
What I typically have done when running a project was to require documentation of at least the inputs and outputs of the functions / methods they write. Also to make the names of those functions intuitive so people can get the gist of what it's doing just by reading the name. Also I definitely think it's a matter of discipline as well when people don't think clearly about what they're doing before they do it, which creates those wacky functions that return 5 different data types depending on the specific conditions.