←back to thread

218 points generichuman | 1 comments | | HN request time: 0s | source
Show context
kuruczgy ◴[] No.44001539[source]
How confident are you in the soundness of the type system?

Also, are there any Lua constructs that are difficult/impossible to type?

Is type checking decidable? (Is the type system Turing complete?)

replies(3): >>44001595 #>>44001876 #>>44005757 #
1. pansa2 ◴[] No.44001595[source]
> How confident are you in the soundness of the type system?

Teal's types are hints, like Python's and TypeScript's, so I suspect it's not sound by design.

> Also, are there any Lua constructs that are difficult/impossible to type?

Teal includes several types that model typical uses of Lua tables, e.g. as arrays, maps etc. It doesn't look like it can type fully general use of Lua tables, e.g. using both the "array part" and "hash part" of the same table.