Actually, I tested it, and Opt{T} = Union{T,Nothing}
does create a constant without const
.
I frankly feel like Julia is a little too eager to incorporate syntactic sugar for trivial stuff like this. It’s not this or any other specific example. It’s just, you know, a thousand paper cuts. I don’t want us to end up in a situation like Perl where every valid UTF-8 string is also valid Julia code. Less is more, where syntax is concerned.