News for hackers. Stuff that matters.
Re:TypeScript is now officially 10 years old by dleslie on Monday October 10, 2022 @04:38PM (#33156146)
The strong evidence in support of static typing for productivity and security is well known and a trivial Google search away.
Re:TypeScript is now officially 10 years old by hbrn on Monday October 10, 2022 @05:40PM (#33156703)
Which you conveniently not linking because you know it's going to be controversial at best.

Get off the high horse, static vs dynamic has been a never ending debate since the dawn of time.

Just because you side with one religion doesn't automatically make it "well known". Learn to recognize your own biases.

Re:TypeScript is now officially 10 years old by dleslie on Tuesday October 11, 2022 @06:27PM (#33170073)
Nah, I was on mobile and linking was cumbersome.

Here, enjoy the trivial search and read through links and their references:

https://www.google.com/search?q=Evidence+for+productivity+an...

I particularly enjoyed this comment:

https://softwareengineering.stackexchange.com/a/59668

Folks who think Dynamic Typing frees them of having to consider types are just fooling themselves; in this thread, even, the argument is that because they know what the types are then stating them is just unnecessary "noise". Which is all well and good, in the here and now, but provides no value when the code is foreign or forgotten; and with just a little additional syntax both the information is available to the programmer and the compiler can perform performance and security analysis with greater ease.

Re:TypeScript is now officially 10 years old by hbrn on Thursday October 13, 2022 @07:30PM (#33197830)
Do you really think I didn't google before?

> for productivity, there's basically no measurable impact detected in studies, positive or negative

As I said, controversial at best.

But you're not being completely honest here. Most research is either inconclusive, or says dynamic is more productive. It is nearly impossible to find research that says static typing is more productive.

Which is quite obvious today, Uncle Bob and Steve Yegge were talking about this since 2000s.

https://sites.google.com/site/steveyegge2/is-weak-typing-str...

https://www.artima.com/weblogs/viewpost.jsp?thread=4639

> with just a little additional syntax

Unfortunately a little additional syntax easily turns into this:

  f(): Array<Promise<ServerResponse.Response<Proto.Response>> | undefined> {...}
I didn't even get to the function body, and I already used multiple levels of my mental stack. Ugh.

And gradual typing is the worst. It is either a terrible idea, or at least a terrible implementation (looking TS/mypy). It combines the worst of two worlds.

The only viable benefit of gradual typing is making dependency hierarchy explicit.