Editing
Type Theory
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span style="color: #FFFFFF;">Applying</span> == '''Modeling 'The Type Checker' (Visualizing how code prevents errors):''' <syntaxhighlight lang="python"> def add_values(val_a, val_b): """ A simple Python version of a type-checking logic. """ type_a = type(val_a) type_b = type(val_b) if type_a != type_b: return f"TYPE ERROR: Cannot add {type_a.__name__} to {type_b.__name__}!" return f"RESULT: {val_a + val_b} (Type: {type_a.__name__})" # Success Case: print(add_values(10, 20)) # Error Case: print(add_values(10, "Hello")) </syntaxhighlight> ; Type Landmarks : '''The Principia Mathematica (1910)''' β The birth of "Simple Type Theory," where Bertrand Russell used "Levels" (Types) to solve the paradoxes of set theory. : '''The Lambda Calculus (1930s)''' β Alonzo Church's system that added "Types" to functions, creating the foundation for all modern programming. : '''Haskell (1990)''' β The programming language that became the "Laboratory" for advanced type theory, featuring the most powerful type system in common use. : '''Homotopy Type Theory (HoTT) (2013)''' β A cutting-edge branch of math that merges type theory with "Geometry" (Topology), suggesting that types are actually "Shapes" in space. </div> <div style="background-color: #8B4500; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;">
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information