Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
C0D47081299dBecause like... every single bug has to do with a lack of a type system.
Lensflare958499dIf the type system prevents one single bug, it’s already worth it.
@C0D4 yeah, RiGhT? Totally dynamic typing's fault
fzammetti131599dI've been developing for the web since 1996. I have never once, in all that time, seen a single error that typing would have avoided. Not. A. Single. One. And most of that time has been spent building highly complex apps, not just simple sites.
As for a build step... since I was doing this long before that was a thing... and I'm still doing it now when it IS a thing... I'm in a position to compare, and I can honestly say that the supposed benefits of a build step are... dubious. And, in my experience, whatever actual benefits there are, tend to be outweighed by the added complexity involved and, more importantly, the increased difficulty of debugging the code that actually executes.
When people look to tooling to in effect cover for deficiencies in developers - which is what way too much of what people are trying to do today in web development is really about in my opinion - then we've lost the forest for the trees.
AleCx042838799d@Lensflare underrated comment, one which makes more sense the more you go up the scale in terms of being a junior to a senior. Type systems are good....there really can't be that much of an argument in there.
AleCx042838799d@fzammetti you have far more time in the game than I do, and I agree with what you have said, but booooooooy have I encountered some fuckd up shit by means of shit developers not knowing how to handle their data. I would suggest that your mental capacity for web dev far outshines that of the other people that i have encountered, but the errors are there and they have been numerous my man. I have seen them. I ain't taking shit from what you have said, and I am happy it ain't happened to ya, but it has to me lol. I make it almost mandatory inside of my office to be very conscious of the types passed around, as all proper devs should, but there be some fuckers out there that just treat the web as the wild west it is.
Imho this discussion lacks a few important details ...
A strong typing system isn't just good for programmers. It's good for the language itself. Many languages without typing support have a myriad of loopholes that are easy to exploit.
In a strictly typed language, it's evident what would happen - e.g. passing an array to a function expecting a boolean value would lead to an error.
Loopholes like these aren't only a plague for the devs, but also for the language devs. You cannot change decisions that were made years ago without breaking compatibility. The reason why e.g. TypeScript probably took over the mess that undefined is.
Otherwise, I agree. Tooling like static analysis cannot make up for bad programming. They are meant as an aid, to support - not to replace. Which is why I'm extremely annoyed by e.g. the whole ChatGPT fuckery.
TLDR: Static typing is useful in a language designed around it, as it allows both the language devs and devs to have a nicer life. But "adding" static typing to a language which was inherently messy in it's base design is just putting lipstick on a pig.
* PHP and Python both have their faults, but compared to JS, their base design is sane. Both PHP and Python evolved, broke compatibility and became better. For JS, this is completely out of scope. It would require a redesign.
@Oktokolo I can understand. It's not that TypeScript itself is bad - but as long as it's bound to JS design decisions, it inherits its flaws, sadly.
TypeScript is definitely an improvement, and makes a lot things from JS "bearable"… but it's still just make up. It transpiles to JS, it's not an language on its own.
Imagine both having the build step AND not having a strong and reliable type system. What have we got ourselves into? Truly an asylum run by its inmates.