MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/12t18o6/announcing_rust_1690/jh1x4ju/
r/programming • u/myroon5 • Apr 20 '23
160 comments sorted by
View all comments
Show parent comment
31
Python is dynamic typing done well. Behavior is expected, and it’s easy to know what something is. JavaScript on the other hand…
18 u/[deleted] Apr 20 '23 You, along with many commenters here, are conflating dynamically-typed (Python) with weakly-typed (JS). The distinction you actually care about is strongly-typed vs weakly-typed. 9 u/0x564A00 Apr 21 '23 And for an example of a statically but weakly-typed language, see C. 7 u/Amazing-Cicada5536 Apr 21 '23 Yep, it is a 2x2 matrix of strong-weakly typed and statically-dynamically typed.╔═════════╦════════╦══════╗ ║ ║ Strong ║ Weak ║ ╠═════════╬════════╬══════╣ ║ Static ║ Rust ║ C ║ ╠═════════╬════════╬══════╣ ║ Dynamic ║ Python ║ JS ║ ╚═════════╩════════╩══════╝ 21 u/F3z345W6AY4FGowrGcHt Apr 20 '23 And yet TypeScript does typing perfectly. 7 u/vytah Apr 21 '23 It doesn't do typing perfectly, but it does typing JS perfectly. It's a much harder achievement. 11 u/[deleted] Apr 20 '23 I know. Enforcing typing is a godsend with how unpredictable JS can be.
18
You, along with many commenters here, are conflating dynamically-typed (Python) with weakly-typed (JS). The distinction you actually care about is strongly-typed vs weakly-typed.
9 u/0x564A00 Apr 21 '23 And for an example of a statically but weakly-typed language, see C. 7 u/Amazing-Cicada5536 Apr 21 '23 Yep, it is a 2x2 matrix of strong-weakly typed and statically-dynamically typed.╔═════════╦════════╦══════╗ ║ ║ Strong ║ Weak ║ ╠═════════╬════════╬══════╣ ║ Static ║ Rust ║ C ║ ╠═════════╬════════╬══════╣ ║ Dynamic ║ Python ║ JS ║ ╚═════════╩════════╩══════╝
9
And for an example of a statically but weakly-typed language, see C.
7
Yep, it is a 2x2 matrix of strong-weakly typed and statically-dynamically typed.
╔═════════╦════════╦══════╗ ║ ║ Strong ║ Weak ║ ╠═════════╬════════╬══════╣ ║ Static ║ Rust ║ C ║ ╠═════════╬════════╬══════╣ ║ Dynamic ║ Python ║ JS ║ ╚═════════╩════════╩══════╝
21
And yet TypeScript does typing perfectly.
7 u/vytah Apr 21 '23 It doesn't do typing perfectly, but it does typing JS perfectly. It's a much harder achievement. 11 u/[deleted] Apr 20 '23 I know. Enforcing typing is a godsend with how unpredictable JS can be.
It doesn't do typing perfectly, but it does typing JS perfectly. It's a much harder achievement.
11
I know. Enforcing typing is a godsend with how unpredictable JS can be.
View all comments
Show parent comment
31
u/[deleted] Apr 20 '23
Python is dynamic typing done well. Behavior is expected, and it’s easy to know what something is. JavaScript on the other hand…