Three classes of types
Three Classes of Types
- Statically checked
- Dynamically checked
- Unchecked
Examples
Statically Checked
What we tend to call type checking.
int, float, double, etc. - i.e. enough bit-level detail that can be checked and peeled off by a preprocessor (most often called a compiler)
Classes, structs, etc.
- Odin
- Haskell
- Rust
- Racket
- Common Lisp when type annotations are used
- etc.
Dynamically Checked
- duck typing
- Odin’s any
- unions
- often implemented by references
- often use GC (Garbage Collection)
- Lisp-style dynamic typing where the procedures check - at runtime - the datatype before performing an operation
- Python
- JavaScript
- Smalltalk
- Lisp
- note that Common Lisp allows for dynamic and static type checking
Unchecked
- note that Common Lisp allows for dynamic and static type checking
- C’s
void *
- Odin’s
rawptr
Appendix - See Also
References
https://guitarvydas.github.io/2021/12/15/References.html
Blogs
obsidian blogs (see blogs that begin with a date 202x-xx-xx-)
Videos
videos - programming simplicity playlist
Books
leanpub’ed (disclaimer: leanpub encourages publishing books before they are finalized - these books are WIPs)
Programming Simplicity Takeaways, and, Programming Simplicity Broad Brush
Discord
Programming Simplicity all welcome, I invite more discussion of these topics, esp. regarding Drawware and 0D
@paul_tarvydas
Mastodon
(tbd, advice needed re. most appropriate server(s))