Is there a nice escaping rule that allows avoiding non-ascii characters in source-files?
That is, some ancient tools and people cannot deal with anything that is not ascii-7-bit in source files, but want to interact with packages that define non-ascii things.
First, this is harmless for literals, as there is a plethora of escaping options (\u… or just binary blob literals).
How do I deal with with symbols? The obvious approach would be:
immutable foo µ::Int end A = foo(4) const mu_sym = Symbol('\u03bc') #not '\u00b5', beware! foo_mu0(A::foo) = getfield(A,mu_sym) foo_mu1(A::foo) = getfield(A,Symbol('\u03bc')) foo_mu2(A::foo) = A.µ foo_mu3(A::foo) = getfield(A,:μ)
Now, all four ways of getting the value work, but the first two are slow (don’t do field/offset resolution at compile time?). How do I get the fast behavior?
Second, how do I access methods with non-ascii names?
Third, is there maybe some syntactic sugar for all of this? So that people without IDE/julia-mode can access e.g. infix-xor, and a minor refactor or automatic tool could get rid of all non-ascii chars in source-files (while preserving identical machine code and names of imports/exports)?