4 ms·
> This is not even to mention the topics of Black.Holes.In.Your.Code because you can't tell what types the functions receive. Use aptly named parameters, alway
by flavio81 9y ago
> This is not even to mention the topics of Black.Holes.In.Your.Code because you can't tell what types the functions receive.
Use aptly named parameters, always, add assert() statements for type checking whenever you feel mistakes could happen.
I can bet, based on my experience, that it's much "safer" (less error-prone) to use a language that allows calling functions with named parameters (where the order of parameters doesn't matter and you know exactly which parameter are you sending a value into), than a language like C++ or Java which has a static typing system but has no named parameteres, plus depends on argument order to call a function.
You should try using Python in this way.
- cleandreams 9y agoWe do that. Try developing a complex code base with a medium sized team. It becomes very hard to make changes!!! You just need compiler support, IMHO. Python offers ease and fun, and that has led to an explosion of functionality. But there is a tradeoff. And at some point we will hit that wall, as an industry.
- mahyarm 9y agoJust use kotlin or golang. You get a modern language and you get types. And you still have java libraries with kotlin. I totally understand the lack of typing & static compilation making things painful once you reach a scale where you can't put the codebase in your head. Asserts, unit tests and variable names are poor substitutes. As an interm solution have you tried converting your internal python code to be fully typed with 'optional types'?
- flavio81 9y ago>golang. You get a modern language Go is far from a modern language, being more like a mutant, crippled subset of Algol-68, which, as the name says, dates from 1968...