Developing Javascript Library with Implicit Typing
摘要
A static type system is well-spread tool to reduce the cost of a program development, debugging and maintenance of a program. It possesses well-known long-term advantages, but imposes restrictions on the code, which may give in to dynamic typing at the prototyping stage. When developing a program on the platform with built-in support for a dynamically typed language, one has to choose between the supported language and statically typed language, which, however, is not directly supported by the platform. The given paper makes an assessment of the advantages and disadvantages of programming languages based on the classification by a number of features (static/dynamic, explicit/implicit, type inference, dynamic type support) for different classes of programs (with and without long-term support, with and without prototyping). Gradual typing is considered as a combination of advantages of dynamic typing at the prototyping stage and static typing at the subsequent stages of long-term development and support. The paper gives an example of the method for developing a Javascript library using a Typescript type system preserving backward compatibility.