One thing that I did not see mentioned here is the fact that introducing "operator hoisting" by introducing that default feature will not solve nullables at all.
I think a basic rule of nullables (at least in C# where I know them from) is the fact that operators can only be applied to a nullable if the underlying type supports them. But the result of an operation that involves a nullable will always be a nullable (because it can happen than any of the operants is null). That means that a := b + c where b or/and c are nullable<int> always causes a to be nullable<int>. Just introducing default where the addition will be performed by the underlying value is not enough because a) the result (if both are not null) has to be converted back into a nullable<int> and b) the result needs to be null if either b or c happen to be null. Both cannot be done by just promoting the addition operator. Because if b or c happen to be null an assignment to an integer would raise an error (at least in C# that is the case - see https://msdn.microsoft.com/en-us/library/ydkbatt6(v=vs.110).aspx) _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel