[fpc-pascal] Is there some disadvantages using mode Delphi?

Sven Barth pascaldragon at googlemail.com
Sun Apr 30 00:14:30 CEST 2017


Am 29.04.2017 22:19 schrieb "Marcos Douglas B. Santos" <md at delfire.net>:
>
>
> On Sat, Apr 29, 2017 at 2:10 PM, Michael Van Canneyt <
michael at freepascal.org> wrote:
>>
>>
>>> Hi,
>>>
>>> I would like to write some packages that should work in FPC and Delphi.
>>> I know that I will need to use {mode delphi} to do that.
>>>
>>> My ask is: Is there some disadvantages using this mode?
>>>
>>> I mean, is there something that we only can do in mode objfpc but not in
>>> mode delphi, or is it just about syntax?
>>
>>
>> It is not just about syntax. In ObjFPC mode, the compiler is more strict.
>> (for examlpe: no method parameter names that concide with properties of
the object)
>
> Hmm, right (in fact I like this feature).
> So, it is about syntax and strict.
>
> But is there something that I can't do with mode delphi but I can using
mode objfpc?
> Let me rephrase: Is there some (new cool) feature that only works in mode
objfpc?

The only thing comes to mind would be complex expressions containing inline
specializations of generics. Due to the Delphi modes not using the
"generic" and "specialize" keywords there is some disambigity that the
compiler is not yet able to handle (most of these cases can however be
worked around either by explicitly declaring the specializations as types
or breaking the expressions up into simpler ones).

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170430/03d24246/attachment.html>


More information about the fpc-pascal mailing list