←back to thread

218 points generichuman | 3 comments | | HN request time: 0.654s | source
1. russellbeattie ◴[] No.44002523[source]
Oof. What is it about the devs who prefer static typing that they insist on bolting it onto every scripting language they can? It's nearly a compulsive disorder.

There's plenty of languages with compile time type safety, just go use one of them and leave the perfectly good dynamic ones alone.

Static typing proponents need accept that dynamic typing is a perfectly valid way to write and run code: It's way less verbose, it focuses code on logic rather than syntax (a.k.a. "scripting"), it's easier to mentally parse and generally easier to both learn and use.

Inflicting types on every piece of code written is just ridiculous.

replies(1): >>44010238 #
2. nmz ◴[] No.44010238[source]
Because when your project reaches the 10k lines mark, you want something telling you "Woops, that function you declared only accepts numbers as the first parameter" and there's nothing preventing lua to have minimal compile time safety while also being backward compatible in fact, I think one of the lua transpilers allowed for function (n number, s string, a) (a is any type here)
replies(1): >>44010904 #
3. russellbeattie ◴[] No.44010904[source]
> "...when your project..."

Oof. The same old excuse. So you prematurely optimize your code based on a theoretical line count in the future, cluttering your code with redundant information to save yourself from that one bug you'll encounter in QA anyways. Got it. Makes total sense. I bet you like Java FactoryFactoryImpls as well.

If you already know your code will reach 10 kloc in a project where catching a type related bug is that important, choose an appropriate type safe language. So many wasted man hours dealing with truly pedantic details.