Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-07

Delphi mode for new features?

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Serguei TARASSOV

Hi All,

My question is inspired by some things asked here last weeks.

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?

I.e. record functions/constructors may reduce the code and make it more safe.

Regards,
Serguei

Reply by email

Jonas Maebe
to Serguei TARASSOV

Serguei TARASSOV wrote on Wed, 01 Jul 2015:

Show quoted text 7 lines
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.

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.

Jonas

Reply by email