3 ms·
I once adapted a pre-Unicode compiler (for a weakly-specified dialect of Basic) to accept non-ASCII identifiers in exactly the fashion you suggest. It worked fi
by marssaxman 3y ago
I once adapted a pre-Unicode compiler (for a weakly-specified dialect of Basic) to accept non-ASCII identifiers in exactly the fashion you suggest. It worked fine, because almost nobody took advantage of the feature, and the myriad avenues for confusion went unexplored. I would not make the same choice today.
- aragonite 3y agoHa! In a way I think that lends support to my suggestion. Allowing all non-ASCII Unicode characters has both positives and negatives. But the negatives are largely negligible, for precisely the reason you mention: most people will not take advantage of that feature (Swift, for example, allows emoji identifiers, but it's extremely rare to find emoji identifiers in actual Swift source code), so the potential for confusion is minimized. On the other hand, the positives (for a small minority of programmers who prefer them) are very real.