339
you are viewing a single comment's thread
view the rest of the comments
[-] TrustingZebra@lemmy.one 4 points 1 year ago

How is dynamic typinf faster? Is typing num = 1 instead of int num = 1 really that much faster?

[-] colonial@lemmy.world 1 points 1 year ago

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.

[-] GaveUp@hexbear.net 1 points 1 year ago* (last edited 1 year ago)

It's not just the physical 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

[-] morrowind@lemmy.ml 1 points 1 year ago

This is why union types are great (also sum types are similar I think, never used those)

this post was submitted on 01 Sep 2023
339 points (96.2% liked)

Programming

17314 readers
342 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS