1. A computer-implemented method, the computer-implemented method comprising: compiling a source program associated with a dynamic language, the source program having a plurality of predefined types, a plurality of user-defined types, and a plurality of methods, each method accepting input values and producing output values, the output values of a predefined type or a user-defined type; during compilation, for each of a plurality of portions of the source program: determining whether the portion comprises a method involving implicit type inference; when the portion comprises a method involving implicit type inference: determining whether the method involving implicit type inference has a user-defined element; when the portion comprises a method having a user-defined element: accessing a user-defined mapping, the user-defined mapping associating a method having a user-defined element with a set of one or more types for input values for the method to a type for each of one or more output values for the method; and performing the implicit type inference based on the user-defined mapping for each output value.
3. The computer-implemented method of claim 1 , wherein accessing the mapping comprises accessing a data table.