[fpc-pascal] with in classes/records

Ryan Joseph ryan at thealchemistguild.com
Mon Sep 3 16:54:40 CEST 2018

> On Sep 3, 2018, at 8:16 PM, Michael Van Canneyt <michael at freepascal.org> wrote:
> The whole point of 'default' is to be able to make this assignment, for example to implement nullable types.

Just thought about this some more and realized that if you’re thinking more in terms of nullable types (which rely totally on assigning if I understand what you mean) than that’s why my idea to have multiple defaults just doesn't make any sense at all.

Does it make more sense if I say for “write” properties (like used for nullable types) there is only one default property allowed but for read-only there could be multiple properties? That mitigates some of the concern I think. If we add compiler errors I think we can make this is very safe feature.

	Ryan Joseph

More information about the fpc-pascal mailing list