Probably a bad idea. I’d swear there’s an issue in the context of #24990 where some argue that S()._
being allowed is a bug, an oversight from when _
variables became forbidden before 1.0, and it might be “fixed” if #24990 ever gets merged.
I think the short answer is: don’t do it.
The more technical answer: as I understand, even if you own S
you don’t own Type{S}
and the usual piracy rules apply: you’re free to define getproperty(::Type{S}, ::T)
where T
is a type you own, but that’s largely useless, what you typically want is the case T == String
or T == Symbol
and that would be type piracy and it will cause problems.