Glyphs as variable names?

The following compiles fine and works, as expected:

    dim a→e As Integer


    MessageBox str(a→e)

And I’m finding it’s sometimes (1) more readable and (2) more explanatory (you may then name a variable “Rectangle→Left as integer” instead of “LeftOfRectangle as Integer”. There are also a lot of other glyphs available and working with them is often helpful (not only in programming).

Xojo is UTF8-compliant, so I’m not surprised it works. Accented words like “Fermé” or “Mañana” are of course useable as variable/object names also.

But, on the other hand, I never see any of them being used. Is that just a “convention” or this can fail under some obscure circumstances (e.g. with the compiler)?

For years you could write code with smiley.

dim :bread: as integer = 1
dim :bacon: as integer = 2
dim :sandwich: as integer = :bacon: + :bread:

Like this maybe.


Yes, I didn’t implied it was a new thing (and I’ve already used it in the past), but wondered why it’s not used that much…

P.S.: great way to make a cooking recipe :slightly_smiling_face:



There are, like you discovered, probably some useful emoji’s & glyphs
If they help readability then use them

They are harder to type though

FWIW you can define methods using symbols as well

Protected Sub ⊇()  
End Sub

and that may make sense for certain applications - OH WE can make APL code in Xojo !

I have found it quite useful when transcribing math formulae into code. As Norman pointed out, it is a pain in the nether regions, but the code is more easily compared with the original math. A lot of Greek, subscripts, etc.

1 Like



Ok, so no evident downside of using them.

My everyday custom-keyboard layout has many of them, actually. Since control+key and option/option-shift keystrokes are mostly useless by default, I made my own layout with those characters.
This works well, except for a bug in OneNote where it doesn’t recognise custom layouts (thus the spell checker is in english) and I’ve done different layouts for Mac and Windows, so, sometimes, I’ve hard time finding some glyphs :wink:

I didn’t know that language… Perhaps could still be useful these days…

Ah, they are really used, actually. Nice, I won’t worry using them anymore.

Thank you all; question solved.

been there wrote that and it is, IMHO, the only write only programming language there is

How about Perl ?

the “someone threw up punctuation on my screen” language ? :stuck_out_tongue:

Mmmm. The one time I posted on the perl netnews group, I found they were having one of their periodical “I can reduce this script to fewer characters than you can” bunfights. They seemed to resent my newbie question.

1 Like