Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I'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. -
@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.
-
@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.
Especially JavaScript. But to not whack on JavaScript alone, PHP / Python are valid examples too. Take PHPs "what converts to false / null" boolean tables for example - you can always fall in that tar pit.
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.
Regarding bugs that can be avoided by static typing ... It depends. Imho JavaScript is too messy in it's base architecture, TypeScript had to inherit a lot of these design mishaps like undefined, thus ... "Putting lipstick on a pig".
https://evrone.com/douglas-crockfor...
Even Douglas started saying that JavaScript should be retired (who was one of those who defended many of the architectural whoopsies in JS).
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. -
@IntrusionCM I definitely like the TypeScript lipstick. Makes JavaScript way more bearable.
-
@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.
Might sound like I wanna make TypeScript a baddie, but it's not good vs bad. It's more logical implication - TypeScript was from the start based up on JavaScript. It was a decision, decision was made, decision made a lot of sense at that time (anyone remember the funky times where JS was browser dependent... And we had more than 2 browser engines ;)).
Related Rants
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.
rant
nodejs