• 14 Posts
  • 309 Comments
Joined 2 years ago
cake
Cake day: June 13th, 2023

help-circle


  • verstra@programming.devtoMicroblog Memes@lemmy.worldoddly specific
    link
    fedilink
    English
    arrow-up
    45
    arrow-down
    2
    ·
    9 days ago

    Well, no. They are not certainly using int, they might be using a more efficient data type.

    This might be for legacy reasons or it might be intentional because it might actually matter a lot. If I make up an example, chat_participant_id is definitely stored with each message and probably also in some index, so you can search the messages. Multiply this over all chats on WhatsApp, even the ones with only two people in, and the difference between u8 and u16 might matter a lot.

    But I understand how a TypeScript or Java dev could think that the difference between 1 and 4 bytes is negligible.








  • Well, you can conclude anything using your reasoning, but that does give the high degree of certainty that is sought after in the studies reviewed in the article.

    Again, I’m not saying that I don’t believe static type checkers are beneficial, I’m just saying we cannot say that for sure.

    It’s like saying seat belts improve crash fatality rates. The claim seems plausible and you can be a paramedic to see the effects of seat belts first-hand and form a strong opinion on the matter. But still, we need studies to inspect the impact under scrutiny. We need studies in controlled environments to control for things like driver speed and exact crash scenarios, we need open studies to confirm what we expect really is happening on a larger scale.

    Same holds for static type checkers. We are paramedics, who see that we should all be wearing seat belts of type annotations. But it might be that we are some subset of programmers dealing with problems that benefit from static type checking much more than average programmer. Or there might be some other hidden variable, that we cannot see, because we only see results of code we personally write.