name guess by the compiler

Nick Treleaven nospam at example.net
Thu Nov 25 11:36:32 PST 2010


On Thu, 25 Nov 2010 09:08:11 -0500, Jason House wrote:

> I believe dmd looks for up to two errors when looking for a candidate
> match. I agree that for single letter variables that doesn't make a lot
> of sense. Even for two letter symbols it probably doesn't make much
> sense either.

It's perhaps a minor quirk, but dmd could be changed to look for names 
with a Levenshtein distance of MIN(2, variable_name.length).

That would prevent 'to' being suggested for 'i', but could still match 
'ii' or 'j'.


More information about the Digitalmars-d mailing list