cm0002@lemmy.world to Programmer Humor@programming.dev · 3 days agoJavaScriptlemmy.mlimagemessage-square43linkfedilinkarrow-up118arrow-down10cross-posted to: programmerhumor@lemmy.ml
arrow-up118arrow-down1imageJavaScriptlemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 3 days agomessage-square43linkfedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squarezagaberoo@sopuli.xyzlinkfedilinkarrow-up0·3 days agoThe risk is when it happens unintentionally. The language is bad for hiding such errors by being overly ‘helpful’ in assuming intent.
minus-squareFooBarrington@lemmy.worldlinkfedilinkarrow-up0·3 days agoSure, but at this point it’s your own fault if you don’t use Typescript to keep these issues from happening.
minus-squarejjjalljs@ttrpg.networklinkfedilinkarrow-up1·2 days ago“Use a different language” is a common defense of javascript, but kind of a weird one.
minus-squareFooBarrington@lemmy.worldlinkfedilinkarrow-up0·2 days agoNot really, considering Typescript only adds static types to JS. It’s not a different language, it’s an extension.
minus-squareQuibblekrust@thelemmy.clublinkfedilinkEnglisharrow-up1·2 days agoSince it needs to be compiled to JavaScript in order to be used, I kind of consider it a different language. Yes, it’s a strict superset of JavaScript, but that makes it different.
minus-squarematlag@sh.itjust.workslinkfedilinkEnglisharrow-up1·2 days agoThat’s also my understanding: “Javascript is great because you can use other languages and then transpile them to JS.”
The risk is when it happens unintentionally. The language is bad for hiding such errors by being overly ‘helpful’ in assuming intent.
Sure, but at this point it’s your own fault if you don’t use Typescript to keep these issues from happening.
“Use a different language” is a common defense of javascript, but kind of a weird one.
Not really, considering Typescript only adds static types to JS. It’s not a different language, it’s an extension.
Since it needs to be compiled to JavaScript in order to be used, I kind of consider it a different language. Yes, it’s a strict superset of JavaScript, but that makes it different.
So, just don’t use JavaScript?
That’s also my understanding: “Javascript is great because you can use other languages and then transpile them to JS.”