Bring Some Of The Type Safety From Rust To LISP with the CL Type System
Gavin Freeborn
This tutorial is focused on the Common Lisp Type System. In combination with SBCL you get some of the features a good type system such as Complex Types, Compound Types, Algebraic Types, Compile Time Type Checking, Better Performance, and much more.
Portacle a Lisp IDE that comes with SBCL: https://portacle.github.io/
Additional Type Resource: https://lispcookbook.github.io/cl-cookbook/type.html
Better Type Syntax: https://github.com/ruricolist/serapeum/blob/master/REFERENCE.md#types
CLHS: Declaration TYPE: http://www.lispworks.com/documentation/HyperSpec/Body/d_type.htm
CLHS: Declaration FTYPE: http://www.lispworks.com/documentation/HyperSpec/Body/d_ftype.htm
Library With Useful Predicates For Making Types: https://github.com/Shirakumo/radiance
Let me know what you think and if there is anything specific you would like to learn about.
----------------► Wanna Support Me? ◀︎---------------- Github: https://www.github.com/sponsors/gavinok Patreon: https://www.patreon.com/gavinfreeborn
----------------► Wanna Checkout My Dots? ◀︎---------------- Vimrc: https://github.com/Gavinok/dotvim Emacs Config: https://github.com/Gavinok/emacs.d ----------------► Come Join The Community◀︎---------------- LBRY: https://open.lbry.com/@GavinFreeborn:d?r=FVxxdjxLmbpPS5K4EdMsLjBjkxv9eEGs Matrix Space: https://matrix.to/#/%23gavinfreeborn:matrix.org Discord: https://discord.gg/JJk5KKU
⏱️TIMESTAMPS⏱️ 00:00:00 - Intro 00:01:03 - The Rise Of Static Typing 00:01:49 - Where Does Lisp Fit In? 00:02:43 - Disclaimer 00:04:14 - Example Type Error 00:05:20 - Get The Most Out of Static Typing 00:05:59 - Additional Runtime Checking 00:06:27 - Static Typing Functions 00:07:43 - How Declaim Works 00:08:38 - Basic Type Overview 00:11:26 - TLDW on Basic Types 00:11:55 - Static Typing Variables 00:13:20 - Algebraic Typing 00:15:48 - Defining New Types 00:18:36 - Creating A URL Type ... https://www.youtube.com/watch?v=OzGVgPY9W-w
160586916 Bytes