Lang.NEXT panel (dfix)
Bruno Medeiros via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Mon Jun 16 06:43:52 PDT 2014
On 12/06/2014 18:53, Andrei Alexandrescu wrote:
> On 6/12/14, 10:40 AM, Nick Sabalausky wrote:
>> On 6/10/2014 12:35 PM, justme wrote:
>>> On Wednesday, 4 June 2014 at 06:13:39 UTC, Andrei Alexandrescu wrote:
>>>> Of possible interest.
>>>> http://www.reddit.com/r/programming/comments/278twt/panel_systems_programming_in_2014_and_beyond/
>>>>
>>>>
>>>>
>>>>
>>>> Andrei
>>>
>>> IMHO, the coolest thing was when Rob Pike told about the tool they made
>>> for automatically upgrading user source code to their next language
>>> version.
>>>
>>> That should be quite easy to implement now in D, and once done, would
>>> give much needed room for breaking changes we feel should be done. Pike
>>> seemed to be extremely satisfied they did it.
>>
>> Personally, I wouldn't be comfortable trusting such a tool. Besides, I
>> find that upgrading a codebase to a newer language version is one of the
>> most trivial tasks I ever face in software development - even in D.
>>
>> It's a cute trick, but not a worthwhile use of development resources.
>
> I very much think the opposite, drawing from many years of hacking into
> large codebases. I'm completely with Rob here. On a large codebase, even
> the slightest manual or semi-manual change is painstaking to plan and
> execute, and almost always suffers of human errors.
>
> I got convinced a dfix tool would be a strategic component of D's
> offering going forward.
>
>
> Andrei
>
What's keeping us from having such a tool? It seems that after one has a
decent parser (that also keeps tracks of the source ranges of AST
nodes), it's easy to write code that does syntactic modifications and
then rewrites the source code. And there's several D parsers out there
already - so it should be too much effort to get there.
Even I am working on a tool that can be easily retrofitted for this purpose.
Or maybe I am misunderstanding the amount of semantic analysis that
would typically be required? Can someone give some examples of
modifications that would be useful for such a dfix tool? (I haven't yet
had the time to watch the full panel video, if that's relevant)
--
Bruno Medeiros
https://twitter.com/brunodomedeiros
More information about the Digitalmars-d-announce
mailing list