D Compiler as a Library
Roman D. Boiko
rb at d-coding.com
Thu Apr 19 09:58:26 PDT 2012
On Thursday, 19 April 2012 at 16:38:31 UTC, Marco Leise wrote:
> Am Thu, 19 Apr 2012 11:24:34 +0200
> schrieb Jacob Carlborg <doob at me.com>:
>
>> On 2012-04-19 10:48, Roman D. Boiko wrote:
>>
>> > Convenience interface on top of low-level core functionality
>> > can be
>> > provided and would suffice for many typical situations.
>>
>> In that case I think something like this might work:
>>
>> Foo.renameSymbol("file.d:16:4", "bar");
>>
>> Where "file.d" is the file in which the symbol is located.
>> ":16:4" would be the row and column number. "bar" would be the
>> new name of the symbol.
>
> Doesn't the D module system make symbols unique? I thought with
> a set of open/relevant files (call it a project if you will) a
> symbol name can be given without ambiguities. This might go
> into bike shedding, but it looks like dropping one of D's
> strengths here. It is of course still necessary to have code to
> look up symbols under the cursor, no question.
I doubt specifying symbol it would be any better than location.
For example, you would not be able to rename a local variable or
any other symbol nested in a function.
More information about the Digitalmars-d
mailing list