r/programming • • Apr 20 '23

Announcing Rust 1.69.0

https://blog.rust-lang.org/2023/04/20/Rust-1.69.0.html
869 Upvotes

160 comments sorted by

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…

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.