3 ms·
I agree that a lot of the implicit type conversions are problematic, but Python's handling of that is hardly as unintuitive as things like a lot of Perl syntax,
by macksd 5y ago
I agree that a lot of the implicit type conversions are problematic, but Python's handling of that is hardly as unintuitive as things like a lot of Perl syntax, or JavaScript typing, etc. If that's the kind of impractical example you have to come up with to showcase this problem, honestly I think that's still pretty good, and I'd still call the implicit type conversions an overall win for the use case being asked about.
I think we could make better languages than Python that fix these issues. Like an implicit boolean -> int conversion does more harm than good, IMO (and it appears in your example). But I'm still not surprised that of the languages we have had when we have had them, that Python absolutely dominates this space.