• 1 Post
  • 51 Comments
Joined 1 year ago
cake
Cake day: July 11th, 2023

help-circle

















  • Let me reverse this question and ask what is the benefit of dynamic typing? What is gained from vaguely defined objects?

    The purpose of typed languages is to ensure the bare minimum when it comes to safety. That when you’re accessing a field of an object that field is real, and that field is always going to be an int or a string.

    Try/catch only goes so far before it becomes way more cumbersome than necessary, as is checking every field of an object.

    Typescript is an example of a language that does static typing poorly, because by design it has to. It’s a quick bandaid fix over an inherently awful language.