> On Jun 7, 2019, at 8:08 AM, Sven Barth via fpc-pascal 
> <fpc-pascal@lists.freepascal.org> wrote:
> 
> Only because this example appears safe does not mean that the whole concept 
> is safe.
> A class might initialize b only later on and with a direct property you'll 
> only get an access violation. So you'll need a getter anyway to provide a 
> better exception type. Or to dynamically create the object instance. 
> 
> I see no reason to revert this change. 

Well, the consequence is that programmers that now know how to be safe are 
going to have to do more work by writing getters/setters. Pascal allows  
potentially unsafe memory access in all other situations so I don’t see why 
properties are any different. We’re targeting the lowest common denominator 
instead of allowing careful programers to do their best.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to