You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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