Skip to content

is Teal strongly or weakly typed? Static or Dynamic? #505

Answered by hishamhm
greensourcecode asked this question in Q&A
Discussion options

You must be logged in to vote

"Statically vs dynamically" is a more well-defined distinction, that is agreed upon in academia. Teal is statically typed; Lua is dynamically typed.

"Strongly vs weakly" is often used to mean the same as the above, but sometimes it is used to mean that you can map memory to different types. In the latter sense, both are strongly typed, in the sense that you can't really map a memory location to a different type (cast in the C sense); in Teal you have a cast, but attempting to use a value as the wrong type will cause a runtime error.

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@greensourcecode
Comment options

@lenscas
Comment options

@greensourcecode
Comment options

@lenscas
Comment options

@catwell
Comment options

Answer selected by greensourcecode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants