5 points · by uvTwitch · 14y ago · 9 comments
For example, I have this, complete with syntax error: class Alternator{ bool value; implicit cast(bool) { get { return value = !value; } } }
I know that this phenomenon exists in quantum physics - that the state of a particle will change due to the act of reading the particle's state - but I don't know if there is a term for it, though if there is it would be ideal.
I figure naming it is important, because otherwise i'm left with mystery object with dodgy tacit behaviour, which is not cool for the uninitiated.
It certainly necessitates careful application, but does have it's uses in reducing copypasta.
Good question but programming languages avoid this, you would have to coin your own.