-
-
Notifications
You must be signed in to change notification settings - Fork 4
type inference
Pannous edited this page Dec 28, 2022
·
4 revisions
type inference means that the developers do not have to specify the types of their parameters and variables. Unlike in scripting languages there is however a hidden type automatically assigned behind the scenes.
x=9
print type of x
"number"
Because type inference comes at a burden for compile times it should be used consciously or mostly for scripting. One hard goal is to serialize type inference graphs so that small changes in code do not result in complete expensive calculations such as in the crystal language