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
-
Yeah, one can detect typos early on, like "ptopname" instead of "propname" (real example from this morning). That's one of the things I hate about uncompiled languages, that you can type basically anything and the code runs but is wrong.
-
I think this example is way over engineered
A senior dev would laugh if she/he makes that mistake, a junior might learns something facing the resulting runtime error without TS. -
plusgut60377y@ronnyhaase it's just an example to demonstrate the possibility.
And in more complex scenarios it very much does make sense.
P.S.I don't think it's overengeneered. -
Luckily JS distinguishes null and undefined, making typos easy to find! Lua, however...
-
nicholai8937yYeah, this is not actually exclusive to TS, implementing it is no different in plain JS.
-
nicholai8937yWhat I really mean is that this is not a benefit of TS and you can do the same in JS.
https://quokkajs.com/docs/... eg -
RTRMS37897yYa, I tried typescript, and it's overkill, my liner deals with simple things like typos and wrong vars, and beyond that I know how to write my damn code.
-
RTRMS37897y@pr0gg3r while probably not true, and probably useful to some, many Front-end even some backend guys believe typescript was made to ease the transition from back to front for devs.
I spent a decade not needing it before it came out, I tried both bits and flow, they both just get on my way, and TS not having full or even the same level of esnext support as babel creates even more problems when I write code it cannot compile because it's behind the times. -
vertti4537y@RTRMS thanks I was looking for a good insight based on experience like you just laid out.
It's stuff like this that makes typescript the only way to write modern JavaScript.
undefined
javascript
webdev
typescript
es6