On Friday, 25 January 2013 at 14:29:22 UTC, mist wrote:
It is a tempting attempt to save two symbols of typing that
completely breaks property semantics. I am objecting against
it. With all my passion.
Use value.is_zero() for UFCS magic.
My understanding of the point of UFCS has been that it enables
you to add functionality to a type without actually modifying the
type. So, let me get this straight... are you saying that the
following code snippet breaks property semantics?
struct MyType {}
@property bool is_valid(MyType)
{
return true;
}
void main()
{
MyType mt;
mt.is_valid;
}
Or, are you saying that we shouldn't be able to add properties to
built-in types? Or are you saying something else entirely?