Sign in Join

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

Mailing lists / fpc-pascal / 2015-07

Re: Delphi mode for new features?

6 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Serguei TARASSOV
Show quoted text 23 lines
Date: Wed, 01 Jul 2015 16:54:30 +0200 From: Jonas Maebe To: FPC-Pascal users discussions Subject: Re: [fpc-pascal] Delphi mode for new features? Message-ID: 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?

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

Reply by email

Michael Van Canneyt
to Serguei TARASSOV
Serguei TARASSOV wrote 12 lines
> 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.

It is very subjective.
Not everyone is interested in all these features.

If you want to use these features all the time, just put them in your config file.

Michael.

Reply by email

Jonas Maebe
to Serguei TARASSOV: Sorry, I didn't understand your point. Out of Embarcadero subject, if 100% convergence is…
Serguei TARASSOV wrote 8 lines
On 01/07/2015 17:08, wrote: > > 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.

The point is that we consider that several features added by Embarcadero make the language less Pascal-like or more complicated for no good reason. "Advanced records" is one such example: that feature already existed, and is called "objects" or "Turbo Pascal-style objects".

Out of Embarcadero subject, if 100% convergence is not possible why do divergence?

To keep our own dialect as clean as possible (in our eyes).

Are you agreed that more FPC is compatible with Delphi "by default", more users can use it without troubles and learning additional docs?

No, because if all they want is Delphi compatibility, they can use Delphi mode. We don't care about which syntax mode they use.

Jonas

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt: It is very subjective. Not everyone is interested in all these features. If you want to…
Michael Van Canneyt wrote
If you want to use these features all the time, just put them in your config file.

+1

And we all know Embarcadero so often _copy really bad ideas_ from other languages - giving no thought to the beauty and structure of the Object Pascal language. I'm personally very glad the Free Pascal team pay attention to the latter two items.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Michael Schnell
to Jonas Maebe: The point is that we consider that several features added by Embarcadero make the…
Jonas Maebe wrote
The point is that we consider that several features added by Embarcadero make the language less Pascal-like or more complicated for no good reason. "Advanced records" is one such example: that feature already existed, and is called "objects" or "Turbo Pascal-style objects".

A really "straight forward" comprehensive variant would be to forget all the different keywords and always us class (maybe introducing a static (create does not allocate memory) and a dynamic (heap based) variant). But as this is not at all "pascal like" this supposedly is not a good idea for a thingy called "free Pascal".

-Michael

Reply by email