All "trending" languages are statically typed (Rust, Go, Swift, Kotlin, ...) and all the popular JavaScrip-improved-languages are statically typed as well. Even further, many dynamically typed languages have pushed in recent years to add type annotations or even static typing (e.g. mypy).
Dynamic typing is the brainchild of the 90s for rapid initial development. Sustainability has been a big issue from the outset.
Of course, like dynamic typing and Lisp, visual environments also had Smalltalk from way back, but they were before big business became infatuated with the ideas.
You can see errors at run-time from mismatches between the code-behind and the forms, but this has nothing to do with the language. It's just the way that certain products like Delphi decided to handle such mismatches. You'll see these types of issues with any code that performs run-time serialization/deserialization of class instances. Our product, Elevate Web Builder, uses a similar architecture with its WYSIWYG form designer/forms (they use JSON instead of a custom key-value format), but it simply ignores properties in forms that don't exist in the actual code.
That said, I do agree that static typing is in vogue.
Highly dynamic languages like Python or PHP or Perl are easy to start with, so they're great for prototypes. Then either a serious rewrite follows, using a statically checked language, or scaffolding is erected to continue to make do with the dynamic code. Microservices help!
Not at all! I think dynamic typing hurts code, but there are:
- not always alternatives
- many other slightly suboptimal choices that it’s quite possible to succeed in spite of
> No, they wrote a faster runtime.
I’m referring to Hack, which is in fact another language with static typing. (Type annotations are static typing with compromises, and you can see what’s being gone for.)
> No, in the past statically typed languages were the norm. C, C++, Java...
Those are not remotely good. Some examples closer to being good are Rust, a step in the right direction that’s still unfolding, and Haskell, a wonderful language hampered by a slow compiler and a lack of decent packages. (And probably several less popular languages, but popularity is an important factor…)
Wait: so you are arguing that startups should use languages that are either incomplete (Rust) or that have slow compilers and poor library support (Haskell), or possibly some other "good" language that doesn't actually even exist?
Probably should have clarified that earlier since it looks like I agree with the statement that choosing Python was “a mistake”; sorry. I don’t. Vehemently.
Which includes a statically-typed version of PHP, namely Hack, that they use for their code.
> No, they added type annotations.
Hack's type checking is much more sophisticated than mere “annotations”. That label might be better suited to PHP's type system.
Nobody is perfect. Mark Zuckerberg has had his fair share of controversies for example.
>No, in the past statically typed languages were the norm. C, C++, Java...
Not good examples for your argument. These are largely considered poorly statically typed. Compare to ML, Haskell, Ada, Rust, Swift for reference.
It's just that dynamic languages outcompeted them.