On May 19, 2012, at 7:00 AM, "Paulo Pinto" <[email protected]> wrote:
> On Saturday, 19 May 2012 at 13:49:28 UTC, Sean Kelly wrote: >> On May 18, 2012, at 7:10 PM, "Mehrdad" <[email protected]> wrote: >>> 2. Okay, so that's clever. :P Now tell me what you do when you have dozens >>> of lines in your source file like >>> @property auto length() { return _range.length; } >>> and you want to rename the field 'length'? How do you prevent the second >>> one from getting renamed? >> >> sed using a regex that accounts for more of the line than just "length", >> like " length(". It only gets tricky if you are renaming a method call with >> a non-unique name, which is when you need to use compiler output to flag the >> offending lines since pure text analysis won't cut it. >> > > Somehow I fail to see how this is more productive than doing a "rename method" > option. It isn't necessarily more efficient. But most editors don't have a compiler built-in, and the ones that do aren't always practical to use.
