[fpc-pascal] Delphi mode for new features?
Serguei TARASSOV
serge at arbinada.com
Wed Jul 1 17:40:48 CEST 2015
On 01/07/2015 17:08, fpc-pascal-request at lists.freepascal.org wrote:
> Date: Wed, 01 Jul 2015 16:54:30 +0200
> From: Jonas Maebe<jonas.maebe at elis.ugent.be>
> To: FPC-Pascal users discussions<fpc-pascal at lists.freepascal.org>
> Subject: Re: [fpc-pascal] Delphi mode for new features?
> Message-ID:
> <20150701165430.Horde.fbBhakisJlFVk-8mGx337HA at mail.elis.ugent.be>
> Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes
>
>
> Serguei TARASSOV wrote on Wed, 01 Jul 2015:
>
>> >As I see (may be mistaken), some_new_ Delphi features are available
>> >only in $MODE DELPHI.
>> >This way lead to divergence of two compilers.
>> >
>> >Why do not implement them in FPC "by default" (when it not
>> >constrained by basic concepts and legacy code) to take the road of
>> >convergence?
> Such new Delphi features are only enabled by default in FPC modes if
> we consider them to not run counter to the spirit of Pascal. That's
> obviously subjective, but so is Embarcadero's decision to introduce
> them. There will never be convergence, because Embarcadero is not
> interested in that.
Sorry, I didn't understand your point.
Out of Embarcadero subject, if 100% convergence is not possible why do
divergence?
Are you agreed that more FPC is compatible with Delphi "by default",
more users can use it without troubles and learning additional docs?
>
>> >I.e. record functions/constructors may reduce the code and make it more safe.
> You can use {$modeswitch advancedrecords} to enable them in any
> non-Delphi syntax mode
> (http://www.freepascal.org/docs-html/prog/progsu106.html ). Virtually
> all new language features we add these days can be selectively enabled
> and disabled via mode switches.
This is a good example of complicating the life.
"One option by feature" to activate every new language feature lead to
growth of end-user documentation and using $MODE DELPHI when it is not
required at all.
In the perfect world $MODE DELPHI should be required only to compile
same unit in both Delphi and FPC.
Why move away this perfect world?
Making the simple complicated is commonplace; making the complicated
simple is hard, that's creativity.
Regards,
Serguei
More information about the fpc-pascal
mailing list