Skip to main content

Tool-supported Refactoring for JavaScript

Max Schaefer ( Oxford University Computing Laboratory )

Recent years have witnessed a resurgence of dynamic programming languages like JavaScript, which eschew the focus on static typing and modularity constructs of languages like Java, promising less development overhead and powerful dynamic features such as execution of generated code. The domain of web programming, in particular, is dominated by such languages.

 

While dynamic features help with rapidly creating new code, they often become a liability once programs grow beyond a certain size, and can be an obstacle to reusability and integration.

 

One solution is to provide the programmer with tools that help them clean up and modularise their code. To this end, we have recently started working on specifying and implementing refactorings for JavaScript. We will discuss some examples of useful JavaScript-specific refactorings, compare them to their Java counterparts, and analyse challenges arising from the dynamic nature and idiosyncratic semantics of the language.

 

 

Share this: