May 10, 2010 Re: dmd 1.060 and 2.045 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | On Mon, 10 May 2010 11:41:08 -0400, BCS <none@anon.com> wrote:
> Hello Steven,
>
>> Several others have privately brought up this problem to Walter. He
>> does not want to change how the symbol lookup tables work, and there
>> is no way to iterate them.
>>
>
> Is it fundamentally impossible to iterate or is the code just not there and/or nasty to write?
I can only speculate, but I would guess the latter. What I can think of is there may be multiple keys for the same symbol (for example alises, or fully qualified names). But even those should be enumerable.
I think the tables themselves are simple hash-maps, but the layers and shadowing is where the problems lie. I don't have a very educated opinion on this, so it may be something else entirely.
-Steve
|
May 10, 2010 Re: dmd 1.060 and 2.045 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | Steven Schveighoffer wrote:
> It may not be an issue, the spell checker is simply a nice hint, but isn't essential to determine errors.
It's a good summary of the situation. I've felt that as long as the message took under a second to generate, it was ok. Realistically, I don't see anyone using identifiers as long as you tested unless they were machine generated.
In my own code, I've found the spell checker is more than a nice hint. Most of the time it nails it and speeds fixing the problem because I don't need to myself go and manually look up the correct spelling.
Iterating through the symbol table is not impossible, it's just a lot of work as it is not designed for that. There are also some issues with shadowing. Furthermore, I'd like the speller to work with the symbol table in the C++ compiler, too, which I don't wish to reimplement.
|
Copyright © 1999-2021 by the D Language Foundation