4 ms·
> you can't change a function signature without having to grep your codebase to find all callsited and pray you fixed them all. I really wonder how people can
by Double_a_92 3y ago
> you can't change a function signature without having to grep your codebase to find all callsited and pray you fixed them all.
I really wonder how people can actually work like that. Is there some overarching methodology like super strict tests with 100% code coverage or so?
- JonChesterfield 3y agoRegex find and replace across a codebase works fine, especially if the functions aren't overload sets.
- thfuran 3y agoIf you have a tiny codebase maybe, but if there are a couple million lines, it's likely that a pretty significant number of functions are sharing names.
- JonChesterfield 3y agoThose would be the overload sets
- alexvitkov 3y agoThe "pray you fixed them all" refers to the fact that you can't really for sure since someone can do foo[`asdf{some expression returning string}`](args) and then good luck catching that call when searching for say `asdf123`. This looks insane when I describe it like that, but you actually see it more often in JS than you'd imagine, and sometimes it may even look justifiable.
- emerongi 3y agoTools like https://comby.dev/ https://comby.dev/ help with the refactoring itself, but I'm never really 100% confident.