[cfe-dev] C++11 migration tools
Douglas Gregor
dgregor at apple.com
Mon Jul 2 11:00:42 PDT 2012
On Jul 2, 2012, at 10:56 AM, Chris Lattner <clattner at apple.com> wrote:
>
> On Jul 2, 2012, at 8:38 AM, Douglas Gregor wrote:
>
>>
>> On Jun 30, 2012, at 8:35 AM, Chris Lattner wrote:
>>
>>> How is it conceptually different than the Objective-C modernizer?
>>
>> It isn't.
>>
>>> Why not have both in one tool?
>>
>> Because that tool wouldn't have any focus. A "C++11 migrator" is something we can rally behind as a useful tool with an obvious scope, as is an "Objective-C modernizer". But a generic source migrator is an abstraction with no obvious usefulness or scope.
>>
>> Obviously, these two tools will share nearly all of their infrastructure, except for the actual migration rules. And, in doing so, we'll demonstrate how best to create your own source-to-source translation tool.
>
> I'm specifically thinking that they should be the same *executable* - of course they'd be different "tools" with different audiences. The interface to the two tools should be virtually identical. Why is it better to have an array of similar tools (that do different rewrites) as an array of executables instead of as a single executable with a mode switch?
Because different users want different tools. The two language migrators presumably aren't the only tools that would go into this side repository; should the eventual code-reformatting tool go into the same executable as well? Are you looking to optimize for build time here, or is there some other reason?
- Doug
More information about the cfe-dev
mailing list