[fpc-devel] RTTI generating

Sven Barth pascaldragon at googlemail.com
Sat Sep 20 09:48:05 CEST 2014


Am 20.09.2014 01:52 schrieb "Hans-Peter Diettrich" <DrDiettrich1 at aol.com>:
>
> Boian Mitov schrieb:
>
>> On Fri, 19 Sep 2014, Adriaan van Os wrote:
>>
>>>>>
>> Your remarks seem to imply that you think RTTI can be used to inspect
any aspect of an object.
>> It was/is not meant for that.
>> <<<
>>
>> Quite incorrect. All languages with modern RTTI allow for full object
inspection, and that includes Delphi 2010 and higher, C#, and even VB has
it.
>
>
> It's up to the coder to make all properties etc. published, when he
*intends* to ever use RTTI on them. That't the way to tell the compiler
what to do.
>
> Inside a program there exists no distinct "brave object inspector" and
"unauthorized object garbler" - both can be implemented by using RTTI. If
you don't like safe types and other restrictions, which exist in Pascal for
good reasons, then choose any unsafe language to implement whatever mess
you like :-]

The extended RTTI introduced with Delphi 2010 allows you to even query
private fields if the class developer decided to enable data generation for
that.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20140920/013edd2b/attachment.html>


More information about the fpc-devel mailing list