Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk2 min

Dynamic Programming Languages: How Runtime Type Checks Work

A dynamic programming language makes key decisions, especially type checks, while the program runs. Dynamic does not mean untyped, weakly typed, or interpreted.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A dynamic programming language lets important decisions—especially whether an operation is valid for a value—be made while the program runs. In the most common use of the term, its type checks happen at runtime rather than in a type checker run before execution. Python, JavaScript, and Ruby are examples.

What “dynamic” means

The phrase has a broad and a narrower use. Broadly, a dynamic language can perform at runtime operations or decisions that other languages may settle at compile time. More commonly, people use “dynamic” to refer to dynamic typing: the program checks values and operations as it runs. The Python typing specification puts the distinction this way: “A dynamically typed programming language does not run a type checker before running a program.”

As an Amazon Associate I earn from qualifying purchases.

For example, a runtime can determine whether a value supports an operation when that operation is reached. If it does not, the program may raise an error then, rather than having a type checker reject the program before it starts.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Dynamic languages still have types

Dynamic does not mean untyped. Values have types, and the language’s runtime rules still determine which operations are valid for them. The Python typing specification explicitly cautions: “This is not to say that the language is ‘untyped’.”

Dynamic typing is different from weak typing

Dynamic versus static typing describes when type checking happens. Strong versus weak typing is a separate distinction about which operations and conversions a language permits. Python, for example, is commonly described as both dynamically and strongly typed; the two labels do not conflict.

Examples: Python, JavaScript, and Ruby

  • Python: Its typing specification describes it as dynamically typed. Values are checked at runtime when operations are performed.
  • JavaScript: Oracle identifies it as dynamically typed; a variable’s type depends on its current value at runtime. The MDN glossary also uses JavaScript examples involving changes to variable types and object properties or methods.
  • Ruby: Oracle also identifies Ruby as dynamically typed.

These examples share runtime type checking, but “dynamic” is not a guarantee that every language behaves identically in every respect.

Can a dynamic language use static checking?

Yes. Dynamic typing does not prevent tools from checking code before it runs. Python supports optional type annotations, and separate type-checking tools can analyze them to find some problems ahead of runtime. Those checks supplement rather than replace Python’s ordinary runtime behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Dynamic does not mean interpreted

The term describes when certain decisions or checks happen, not how a language implementation executes code. The definition alone does not tell you whether an implementation interprets code, compiles it, or combines techniques.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.