hisham muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · lua, scheme, erlang, python, ruby,...
TRANSCRIPT
![Page 1: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/1.jpg)
minimalism versus typesHisham Muhammad<[email protected]>
![Page 2: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/2.jpg)
minimalismLua: fits in my head
![Page 3: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/3.jpg)
g
![Page 4: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/4.jpg)
typespair-programming with the computer
![Page 5: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/5.jpg)
untyped: no types at allassembly, un(i)typed lambda calculus
typed: types exist!string and number are different things
(even if you can do "1" + 2)
![Page 6: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/6.jpg)
dynamically typed:values have types, variables don't
Lua, Scheme, Erlang, Python, Ruby, PHP, etc.
statically typed:values have types, variables have types
C, Java, Go, C#, Rust, Haskell, etc.
![Page 7: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/7.jpg)
strongly typedweakly typed
![Page 8: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/8.jpg)
dynamically typed:values have types, variables don't
Lua, Scheme, Erlang, Python, Ruby, PHP, etc.
statically typed:values have types, variables have types
C, Java, Go, C#, Rust, Haskell, etc.
![Page 9: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/9.jpg)
what happens when we putminimalism and types together?
![Page 10: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/10.jpg)
a brief history of typing Lua
![Page 11: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/11.jpg)
2013: Tidal Lockhttps://github.com/fab13n/metalua/blob/tilo/src/tilo/readme.md
![Page 15: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/15.jpg)
and yet
![Page 16: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/16.jpg)
why is it so hard?
![Page 17: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/17.jpg)
once you add types and the whole enchilada that comes with it, then the language is
no longer minimalistic,right?
![Page 18: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/18.jpg)
once you add types and the whole enchilada that comes with it, then the language is
no longer minimalistic,right?
types make our tiny languages complicated?
![Page 19: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/19.jpg)
the problem is kinda the opposite
![Page 20: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/20.jpg)
dynamically typed languageshave HUGE type systems
![Page 21: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/21.jpg)
type system: set of rules that describewhat are the valid interactions of values
in correct programs
![Page 22: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/22.jpg)
type system: set of rules that describewhat are the valid interactions of values
in correct programsit's in your head!
![Page 23: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/23.jpg)
you are the type checker
![Page 24: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/24.jpg)
obj.x, obj.y = get_coords()
can't do that:yesterday I changed get_coords from
return x, yto return { x = x, y = y }
![Page 25: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/25.jpg)
what are the rules in your head?
![Page 26: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/26.jpg)
dynamically typed:values have types, variables don't
Lua, Scheme, Erlang, Python, Ruby, PHP, etc.
statically typed:values have types, variables have types
C, Java, Go, C#, Rust, Haskell, etc.
dependently typed:values have types, variables have types...
and types have values! and types!Idris, Agda... not that many yet!
![Page 27: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/27.jpg)
function f(a, b)
![Page 28: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/28.jpg)
function f(a, b)
a: integerb: if a < 256 then string else array of strings
![Page 29: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/29.jpg)
function f(a, b)
a: integerb: if a < 256 then string else array of strings
red: integergreen: integerblue: integer
![Page 30: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/30.jpg)
function f(a, b)
a: integerb: if a < 256 then string else array of strings
red: integergreen: integerblue: integer
f(red, {1, 2, 3})
![Page 31: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/31.jpg)
Curry-Howard correspondencepropositions ↔ typeslogic ↔ type system
![Page 32: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/32.jpg)
btw, arithmetics is undecidable
![Page 33: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/33.jpg)
local t = {} local ok, err = load_values_into_table(t) if not ok then return nil, "failed! " .. err end return { r = t[1], g = t[2], b = t[3] }
![Page 34: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/34.jpg)
Lua: table is the only structured type
![Page 35: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/35.jpg)
everything is a tablea table is anything
![Page 36: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/36.jpg)
everything is a tablea table is anything
an array
![Page 37: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/37.jpg)
everything is a tablea table is anything
an arraya dictionary
![Page 38: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/38.jpg)
everything is a tablea table is anything
an arraya dictionary
a struct
![Page 39: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/39.jpg)
everything is a tablea table is anything
an arraya dictionary
a structan object
![Page 40: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/40.jpg)
everything is a tablea table is anything
an arraya dictionary
a structan object
a dictionary mapping objects to strings or arrays depending on whether field x of the
key object is true or false
![Page 41: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/41.jpg)
expressiveness
![Page 42: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/42.jpg)
not really what a language can expressbut how can you express it
![Page 43: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/43.jpg)
dynamically typed languages aresuper expressive
like a blank sheet of paper
![Page 44: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/44.jpg)
type checker works both for good("Thank you for catching my silly typo!")
and bad("no, I _know_ that this use of the variable is safe!")
![Page 45: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/45.jpg)
expressiveness is the feel of a language
![Page 46: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/46.jpg)
local t = {} t.name = "items" t[1] = 100 t[2] = 200
![Page 47: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/47.jpg)
here's the dilemma:how much of the language do you change?
![Page 48: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/48.jpg)
if you want to make it feel like Lua,then the type checker is super complexif you want to finish your type checker,
you have to make cuts somewher
![Page 49: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/49.jpg)
two options on where to make cuts
![Page 50: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/50.jpg)
cut on programmer expressiveness{ name = "items", items = {100, 200} }
return x, y and return nil, errvs.
return x, y and return nil, nil, err
![Page 51: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/51.jpg)
cut on the correctness of the type checker
![Page 52: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/52.jpg)
"every program the type checker accepts has correct types"
"every program that the type checker rejects has wrong types"
![Page 53: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/53.jpg)
the more sophisticated your type system,the deeper you are in research territory
![Page 54: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/54.jpg)
soundness vs. usability (vs. performance!)Typed Lua
Typed ClojureTyped Racket
![Page 55: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/55.jpg)
is all lost?
![Page 56: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/56.jpg)
TypeScript
![Page 57: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/57.jpg)
usability above all elsehttps://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
![Page 58: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/58.jpg)
intentionally unsound
![Page 59: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/59.jpg)
intentionally unsound
![Page 60: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/60.jpg)
what about Lua?
![Page 61: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/61.jpg)
exploring this design space
tl: minimalistic Lua type checkerwhat's the minimum set of features
so that it can check itself?
![Page 62: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/62.jpg)
tl tl.tl: currently fails with 384 type errors
![Page 63: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/63.jpg)
tl tl.tl: currently fails with 384 type errors(one week ago it was 1493!)
![Page 64: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/64.jpg)
TypeScript: JavaScript-like(features, features, features!)
tl: aiming for Lua-like(a balance between functionality and small size)
![Page 66: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/66.jpg)
so, in closing
![Page 67: Hisham Muhammadhisham.hm/papers/talks/minimalism-vs-types.pdf · Lua, Scheme, Erlang, Python, Ruby, PHP, etc. statically typed: values have types, variables have types C, Java, Go,](https://reader033.vdocuments.mx/reader033/viewer/2022051811/6020bbf1c069bf413e212b13/html5/thumbnails/67.jpg)
Lua and types: to be continued!
thank you