DEV Community

Cover image for Static vs Dynamic Data Typed Languages
Lakshgupta
Lakshgupta

Posted on

1

Static vs Dynamic Data Typed Languages

Static Data type Languages:

  • Variables are judged at compile time.
  • Explicitly type declarations are required before hand.
  • Values are static types which can't be altered once set.
  • Produces more optimized code with the compile time performance check.
  • C , C++ , JAVA , GO
string language_type;
language_type = "static"
Enter fullscreen mode Exit fullscreen mode

language_type = 1

Dynamic Data type Languages:

  • Variables are evaluated at runtime.
  • No need to declare the data type before hand.
  • Values are dynamic and can be altered with their types.
  • Reduces extra efforts but in the end is less optimized as the code is prone to runtime errors.
  • PHP , Perl , Python , JavaScript
var language_type;
language_type = "dynamic"
Enter fullscreen mode Exit fullscreen mode

language_type = true

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay