Fun with Unicode: TemplateᐸTᐳ syntax and more

Inspired by a Go example:

julia> const VectorᐸIntᐳ = Vector{Int}
Vector{Int64} (alias for Array{Int64, 1})

julia> [1,2,3] isa VectorᐸIntᐳ
true

julia> x = 2
2

julia> xᐸ3 = x<3
true

julia> xᐸ3+4
5

julia> ᐸ = >
> (generic function with 3 methods)

julia> findfirst(ᐸ(3), [1,2,3,4,5])
4

via Unified Canadian Aboriginal Syllabics characters U+1433 and U+1438 (valid identifiers in most modern programming languages, including Python 3, because they are category Lo “Letter, Other”).

235a0v

5 Likes

Cursed examples using '\U037E' == ';' are left as an exercise to the reader.

1 Like

(That’s not valid in Julia identifiers because it is in category Po “Punctuation, Other”.)

1 Like

Better to use the (aptly-named) U+1434.

1 Like

Julia also supports U+1F4A9 for scatological programming (a vast advantage over Python 3, Go, and other languages, which typically do not allow emoji identifiers).

1 Like