257m to [email protected] • 2 years agoWhat are your programming hot takes?message-square868fedilinkarrow-up1316arrow-down112
arrow-up1304arrow-down1message-squareWhat are your programming hot takes?257m to [email protected] • 2 years agomessage-square868fedilink
minus-square@[email protected]linkfedilink4•2 years agoHow is dynamic typinf faster? Is typing num = 1 instead of int num = 1 really that much faster?
minus-square@[email protected]linkfedilink1•2 years agoPlus, most statically typed languages either do type inference by default or let you opt in somehow. Even Java, which is probably the reason everyone hated static typing for the first decade of the century or so, now has var.
minus-squareGaveUp [she/her]linkfedilinkEnglish1•2 years agoIt’s not just the typing It’s the fact that you can be extremely flexible with data structures and variables E.g. you can have a list of strings and ints in Python but not java
minus-square@[email protected]linkfedilink1•2 years agoThis is why union types are great (also sum types are similar I think, never used those)
How is dynamic typinf faster? Is typing
num = 1
instead ofint num = 1
really that much faster?Plus, most statically typed languages either do type inference by default or let you opt in somehow.
Even Java, which is probably the reason everyone hated static typing for the first decade of the century or so, now has
var
.It’s not just the typing
It’s the fact that you can be extremely flexible with data structures and variables
E.g. you can have a list of strings and ints in Python but not java
This is why union types are great (also sum types are similar I think, never used those)