Dropbox
Dropbox logoDropbox · Feature trail

Client-side Language Transpilation

2 posts · Sep 2012 – May 2020

What this trail covers

Dropbox has adopted and scaled Python static type checking using mypy across millions of lines of code. This initiative began as academic research and evolved into a core engineering practice, improving code understanding, maintainability, and developer productivity. The adoption involved standardizing type hinting syntax through PEP 484 and integrating mypy into development workflows, enabling faster iteration cycles and reducing bugs. The team also adopted CoffeeScript for its browser-side codebase, replacing JavaScript. This initiative involved rewriting over 23,000 lines of code, resulting in a 21% reduction in lines of code and tokens. The team implemented a server-side instrumentation for seamless recompilation during development and ensured production bundles remained unchanged in size and performance. This move aimed to improve code readability, maintainability, and developer productivity by leveraging CoffeeScript's syntactic sugar. The migration from CoffeeScript to TypeScript was a significant undertaking, involving the conversion of hundreds of thousands of lines of code. This effort improved code maintainability, reduced errors, and modernized the web platform.

All Dropbox trails