4 ms·
I think your (and the article's) argument could be summarized as "static type annotations without automated enforcement by actually running a type checker consi
by ledauphin 5y ago
I think your (and the article's) argument could be summarized as "static type annotations without automated enforcement by actually running a type checker considered harmful".
Since this argument is not meaningfully different from "comments that are lies considered harmful", it seems fair to expect reasonable people to dismiss it as uninteresting.
- the_af 5y ago> it seems fair to expect reasonable people to dismiss it as uninteresting. Do you think that's a fair treatment of someone who disagrees with you but has been respectful of your opinion so far? I realize proglang debates are flamewar territory. But I have been very careful to state I find Python type hints puzzling and less useful than they should be. It is obviously an interesting opinion shared by many others, not just me or the article's author. As a fan of statically typed languages, I do indeed find some Python programmers engage in a form of Stockholm's syndrome. It usually takes the form of the assertion "I never found a bug that was a type error". Have you or anyone you know ever said this? In my mind, the opposite statement of the one you attribute to me would be "wishful thinking and a positive attitude is enough to catch mistakes, it's not necessary to have help from automated tooling". In this day and age, I cannot disagree more.
- ledauphin 5y agoI'm very confused by your response. Where did I suggest that I don't like type systems or think automated tooling is not useful? It's precisely because I do like and use them that I find Python's static type hints to be extremely useful for large Python codebases. What I hear you saying is "Python does not offer these things". What I hope you hear me saying is "Python does, in fact, offer these things".
- the_af 5y agoWell, you did frame the discussion as: > I think your (and the article's) argument could be summarized as "static type annotations without automated enforcement by actually running a type checker considered harmful" It illustrates your mindset, in my opinion. I think type annotations without checking them (or without a satisfying implementation of said type checking) are mostly pointless. You also left out the part where I remarked on the dismissive tone of your reply.
- comex 5y agoIt is meaningfully different because, as the article says, comments are known to not be machine verified and thus to potentially be wrong. With type hints, they’re usually verified, but not always, so you’re more likely to trust them and get a nasty surprise when they turn out to be wrong. However, there are other aspects to the article’s argument, such as the fact that it’s easy to end up with type annotations going silently unenforced even if you do run the checker.