4 ms·
There is a good talk from a Facebook engineer about this for JavaScript: https://www.youtube.com/watch?v=d0pOgY8__JM https://www.youtube.com/watch?v=d0pOgY8__JM
by vjeux 10y ago
There is a good talk from a Facebook engineer about this for JavaScript: https://www.youtube.com/watch?v=d0pOgY8__JM https://www.youtube.com/watch?v=d0pOgY8__JM
It usually goes like this:
- You make your API backward compatible.
- You use grep to try and find all the ways people are using it.
- You write and run a codemod to convert 70-90% of the call sites mechanically.
- You manually fix the remaining ones. This is usually a good opportunity to throw a hackathon-style event where a bunch of people sit in a room for few hours and drive it down.
- You remove support for the previous version.
- domlebo70 10y agoOh I don't miss Javascript/poorly typed languages.
- gefh 10y agoNearly all js at google is typed to some degree with closure compiler annotations.
- ionforce 10y ago> You use grep to try and find all the ways people are using it. The mere thought of this makes me think of the dark ages and a time in my career that I'd rather forget. All hail statically typed languages. Or languages that can easily be tooled against.
- _asummers 10y agoIf Facebook uses Flow internally, tooling could be written against that. Hell, just removing the old function and seeing the compile errors would expose all the call sites if their whole code base is Flow typed.