MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1bjjkm6/arejsdevsactuallysane/kvsjoio/?context=3
r/ProgrammerHumor • u/jarulsamy • Mar 20 '24
554 comments sorted by
View all comments
Show parent comment
9
The whole point of a loosely typed language is that types don't fail, they convert. That's the whole fucking point.
20 u/Eclipsan Mar 20 '24 Which leads to unexpected behaviors, side effects and bugs. Type juggling is bad. 5 u/edgmnt_net Mar 21 '24 And somehow they think it's faster to write code that way. Until 80% of your time becomes effort spent debugging and writing meaningless tests to exercise every possible thing, because everything can blow up. 1 u/[deleted] Mar 21 '24 And this is why typescript exists. 8 u/Antrikshy Mar 20 '24 I guess so.But since RegExp is a class, and not a primitive, it doesn't seem impossible for its constructor to check something like typeof param === "string". 2 u/intotheirishole Mar 20 '24 A loosely typed language is meant only for beginners who dont know how to code and not the backbone of the whole internet.Thats the whole fucking point. 0 u/Dmytro_P Mar 20 '24 Right, it's a main disadvantage of weakly typed languages.
20
Which leads to unexpected behaviors, side effects and bugs. Type juggling is bad.
5 u/edgmnt_net Mar 21 '24 And somehow they think it's faster to write code that way. Until 80% of your time becomes effort spent debugging and writing meaningless tests to exercise every possible thing, because everything can blow up. 1 u/[deleted] Mar 21 '24 And this is why typescript exists.
5
And somehow they think it's faster to write code that way. Until 80% of your time becomes effort spent debugging and writing meaningless tests to exercise every possible thing, because everything can blow up.
1
And this is why typescript exists.
8
I guess so.
But since RegExp is a class, and not a primitive, it doesn't seem impossible for its constructor to check something like typeof param === "string".
typeof param === "string"
2
A loosely typed language is meant only for beginners who dont know how to code and not the backbone of the whole internet.
Thats the whole fucking point.
0
Right, it's a main disadvantage of weakly typed languages.
View all comments
Show parent comment
9
u/bronkula Mar 20 '24
The whole point of a loosely typed language is that types don't fail, they convert. That's the whole fucking point.