3 ms·
All three criticisms are entirely based on opinion: • One either likes, doesn't care about or doesn't like encapsulation. I fall in the second camp so... meh.
by luord 9y ago
All three criticisms are entirely based on opinion:
• One either likes, doesn't care about or doesn't like encapsulation. I fall in the second camp so... meh.
• One either likes, doesn't care about or doesn't like functional programming. I fall in the second camp so... meh.
• One either likes, doesn't care about or doesn't like static typing. I fall in the second camp (although I admit I do have a preference for dynamic typing) so... meh.
On that third point: Whenever anyone gets into the "but muh type checks at compile time!" I just think, always, that one should write unit tests for everything anyway, no matter the language. The only difference between static and dynamic languages in that regard becomes, then, that the type in static languages is checked twice: in the test and at compile time. So I was waiting for this person to mention tests anywhere...
> Often in dynamic languages, even with a decent test suite, extensive changes can be really difficult.
And he did... with a non-point. Extensive changes are (not merely "can be") really difficult, in any language, no matter the type system.
Frankly, most of this article could be summed up as "I, really, really want Python to be Java", and the half-assed attempt at critiquing java at the end deters that notion very little. I, for one, like Python specially because it is very much not Java and I'm glad it'll stay that way.
> But I’ll be looking elsewhere if I want to write robust software.
Why do people who write this kind of articles always include sophomoric comments like this? Python has been around for longer than Java (or Go, which seems to be the other language he wants python to be, but I like Go so that's fine) and a lot of very robust stuff has been written with it.
- GuB-42 9y agoYes, we should all write unit tests, have 100% coverage, all that stuff. I practice it never happens. If you are lucky enough to have unit tests, they are full of holes and/or outdated. I've seen it happen on critical software. The kind where a crash can literally kill people, and where appropriate testing is mandated by law. Relying on unit tests for anything is madness. They are nice to have, but they are just another layer in a defense in depth strategy, not something you can count on. Static checks (including typing) is another layer, just like code reviews, functional tests, etc... And yeah, you can write very robust code in any language, but Python doesn't help much.
- kiriakasis 9y agoi agree, something i always wondered about 100% coverage was "am i going to unit test my unit tests too"
- luord 9y ago> they are [...] outdated How can an unit test be outdated? Honest question because, from what I've seen, if whatever it was testing doesn't work anymore (or if something that wasn't supposed to work starts working) then the test fails, fulfilling its purpose. In other words: I don't see how I would write a test that wasn't self-updating, by alerting that it needs to be changed. > Relying on unit tests for anything is madness. They are nice to have, but they are just another layer in a defense in depth strategy, not something you can count on. Static checks (including typing) is another layer, just like code reviews, functional tests, etc... Not sure what you tried to say here. "Relying on unit tests is madness" I can understand (if not agree with), but then you went out to compare it with other practices. Is relying in those practices madness too? If so, what's the point of anything? > And yeah, you can write very robust code in any language, but Python doesn't help much. Is there a language that does? I could turn this around and say that you can write truly horrible code in any language, and [insert whatever language you like here] doesn't prevent it much.
- kiriakasis 9y ago> All three criticisms are entirely based on opinion: "Favorite" is a focal word of the title, i would be surprised if the content was not about opinions. > most of this article could be summed up as "I, really, really want Python to be Java" to anybody its tastes, the author was disappointed by (the expevtations of) python and was complaining > > But I’ll be looking elsewhere if I want to write robust software. again a personal statement which takes nothing away from others people ability to write robust software. If nothing else how i personally interpretated the article was a complain about unmatched expextations and personal pain points.