On 03/17/2011 09:55 PM, Darren Duncan wrote: > It occurs to me, both from my own experience in writing code as well as seeing > some production code by others, that spell-checking may be useful in > programming > languages. > > To be specific, often user-defined entities such as variable or routine names > or > attribute names or type names may be declared with dictionary words, but > sometimes they may be misspelled, and programmers may not always spot this. > > I think it would be useful for programming language implementations to > provide > the option to flag entity names that appear to be mis-spelled dictionary > words for programmers.
Depends on what you mean by "programming language implementations". If you are talking about tools like lint, I fully agree. If are talking about the compiler, I'm afraid I have to disagree -- it's not their job. The good news is that we already have STD.pm6, which gives you parse tree and makes it rather easy to extract identifiers. You can write such a tool today. And even better, since niecza uses STD.pm6 for bootstrapping (*), you can even write such a tool in Perl 6 today. Have fun! (*) actually a slightly simplified version, but still quite the same in structure Cheers, Moritz