Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Static Typing

< >
Example from 1 languages: Python
# Optional, checkable using external type checkers like Mypy or Pyright def print_repeated(text: str, repetitions: int) -> None: print("\n".join([text]*repetitions)) print_repeated("Hello!", 10) print_repeated("This won't typecheck...", "not an integer")
Example from 1 languages: Speedie
|| x = "Hello" x = 1 // fails to compile... because x is a string
Example from 1 languages: kaikai
fn add(a: Int, b: Int) : Int = a + b
Example from 1 languages: Faber
fn add(int a, int b) → int { return a + b }
Example from 1 languages: Hybrix
func get_area(width: int, height: int): int
*

Languages with Static Typing include C, Python, Java, C++, TypeScript, Rust, Scala, Kotlin, Haskell, Nim, Haxe, Chapel, OCaml, carp, Ceylon, progsbase, Xtend, Jule, Speedie, Mach, kaikai, SISAL, Morloc, NOVA, Faber, Hybrix, Cobrust, Abyss, Lateralus

*

Languages without Static Typing include JavaScript, Bash, USSR

*

View all concepts with or missing a hasStaticTyping measurement

*

Read more about Static Typing on the web: 1.

- Build the next great programming language · Add · Add Prompt · Issues · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements