Can anyone explain the difference between type-checking and type-inference problem ?
I have tried to search for the difference, but I couldn't not find any compelling source that clearly explains the difference. If possible include examples also.
Can anyone explain the difference between type-checking and type-inference problem ?
I have tried to search for the difference, but I couldn't not find any compelling source that clearly explains the difference. If possible include examples also.
Given the code:
Is there anything you could say about what
lst
has to be or what the procedures return type? A compiler might do the same and it would be called type inference.Type checking is checking of the types specified in the code or inferred. It will fail if there are inconsistencies in the code or it's not clear from inferring that it adds up.