-
- Sure, you can use
_
as a field name so I don’t see why you couldn’t use it as a property name. Either case is kind of user unfriendly though, since property destructuring,(; _) = S()
, puts your field into a write-only variable.
- Sure, you can use
- 2-4. Don’t mess with properties of types you don’t own. (
S
is yours, but nottypeof(S)
). -
- The most obvious consequence is that you can’t tab-complete your properties in the REPL.
-
- You need to be very careful with only using
getfield
to access your real fields inside yourgetproperty
andsetproperty!
implementations, to avoid performance traps.
- You need to be very careful with only using
2 Likes