Dynamic, Static, Weak, and Strong languages

I used "spectrum" to signify that languages aren't just one or the other; most languages have aspects of both.

"Dynamic languages" is often opposed to "Strongly typed languages," but that isn't actually always the case.

It would be more correct to call languages like GDScript, Python, or JavaScript "implicitly typed." The types are always there! You might just not know them.

When you write var number = 10, number is an integer. The type is there, and it is enforced when used in an operation: in GDScript, you can't do "hello" + 10. You need to convert the number to a string first. There is very little implicit coercion.

GDScript is optionally typed, and when that happens, those types become "strictly typed," because you cannot reassign a different type to a variable.

On the other hand, JavaScript will happily juggle from one type to another. 1 + {} is perfectly valid in JavaScript. It has much more implicit coercion. But even JavaScript is more strongly typed than C++ for example. In C++, the language allows you to read a class as an integer, for example, or use any type as any other, since values are just a bunch of bits.

And for yet another example, Rust is explicitly and strongly typed, but a variable can change its type (through a process called "shadowing").

Become an Indie Gamedev with GDQuest!

Don't stop here. Step-by-step tutorials are fun but they only take you so far.

Try one of our proven study programs to become an independent Gamedev truly capable of realizing the games you’ve always wanted to make.

Nathan

Founder and teacher at GDQuest
  • Starter Kit
  • Learn Gamedev from Zero
Check out GDSchool

You're welcome in our little community

Get help from peers and pros on GDQuest's Discord server!

20,000 membersJoin Server

Contribute to GDQuest's Free Library

There are multiple ways you can join our effort to create free and open source gamedev resources that are accessible to everyone!