If we had a script to check for this, it could be set up as part of the default Travis thing generated for packages.
There could be a package/tool to generate helpful error messages when you try to used a function/MathConstant by the wrong (confusable) unicode character. Something like "You're using the wrong pi; try this one or the name `pi`". -- Leah On Fri, Jan 17, 2014 at 11:32 AM, Milan Bouchet-Valat <[email protected]>wrote: > Le vendredi 17 janvier 2014 à 12:07 -0500, Jiahao Chen a écrit : > > > It seems like a huge problem to me if, when I read your code, I > > can’t tell which characters you’re using just by reading your code. > > > > Seems ridiculous, doesn't it? Welcome to the world of non-ASCII > > character sets ;-) > > > > I think we can agree that it would be nice to have a better way of > > detecting Unicode homograph collisions than manual verification. We > > could try to standardize on various codepoints. But I think we'll just > > have to agree to disagree on making this a prescription. > If a tool is written to automatically format Julia code, it could also > check that two homograph characters are not used at the same time in the > same project. This would catch all problematic cases, and I don't think > there would be many false positives. > > That wouldn't catch the case were you do not call the tool at all before > running the code -- but doing the check in the compiler itself may slow > down compilation. > > > Regards >
