[fpc-pascal] All methods vitrual ?
Michael Van Canneyt
michael at freepascal.org
Wed Oct 11 16:58:16 CEST 2023
On Wed, 11 Oct 2023, Adriaan van Os via fpc-pascal wrote:
> Michael Van Canneyt via fpc-pascal wrote:
>
>> $M controls the inclusion of RTTI, i.e. it allows or disallows the use of
>> the published section.
>> No more, no less.
>
> I don't see any use in allowing or disallowing something. And with the
> current design, it is, as I said, impossible, without macros, to compile the
> same code with {$M+} and {$M-}.
While I agree with your statement about allowing/disallowing use of
'published' based on a directive, we inherited this from Delphi
and it is a very basic part of the language & RTL, so changing it
is simply not an option.
The extended RTTI is meant to remedy this (also in Delphi),
but IMO it introduces its own problems (you'll love the amount
of compiler directives it needs ;)).
I'm surprised to hear about your failure to get fcl-passrc to work,
since it is used to create the docs based on the fpc sources.
Additionally it forms the basis of pas2js, which fully supports all FPC constructs.
That said, I realize the (correct) use of fcl-passrc may be a bit hermetic...
Michael.
More information about the fpc-pascal
mailing list