4 ms·
Type checking is typically done statically, i.e. during compile time. By the time you have AST it's too late. Think about it, how would you handle type annotat
by vinceguidry 12y ago
Type checking is typically done statically, i.e. during compile time. By the time you have AST it's too late.
Think about it, how would you handle type annotations in an agnostic type checker?
- siscia 12y agoIt's definitely me being to naive, however I would type all the expression, in either the source code (into comment) or in a separate file, and all the statement. Now I do have a table of symbols and their type. At this point its just a matter of using the AST to being sure that everything is correctly typed... Am I wrong ?