Re: [fpc-pascal] Delphi mode for new features?

2015-07-05 Thread Florian Klaempfl
Am 02.07.2015 um 12:37 schrieb Serguei TARASSOV:
> 
> Be honest, I have doubts about "Pascal spirit" of this genre.

FPC tries to support all flavours of pascal, even ISO. If you are
interested only in one flavour, just add the appropriate mode switch to
your config and be done. If FPC limited itself only to one flavour, it
wouldn't probably exist anymore/being dead.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Delphi mode for new features?

2015-07-02 Thread Jonas Maebe

Serguei TARASSOV wrote on Thu, 02 Jul 2015:


Object type can be used as "advanced record" in FPC mode only.
I'm agreed that it is good evolution since turbo pascal.
But in Delphi mode you cannot use object type in a same manner (i.e.  
for operator overloading) and then should use advanced records.


We can't help that. FPC supported operator overloading long before Delphi did.

As result, when the same unit should be compiled with both Delphi  
and FPC, you cannot use the power of both languages but only subset  
of them.


I still don't understand this argument. If you want to compile a unit  
both with FPC and Delphi, develop the code in Delphi (so you don't  
accidentally use FPC-specific routines from the FPC RTL) and use  
{$mode delphi} to compile it in FPC. Of course you can't use  
FPC-specific features if you want to compile your code also with  
Delphi, just like you can't use GCC-specific features if you want to  
compile your code also with MSVC.


Over time, we add all (or at least most) features that Delphi support  
to {$mode delphi}. It's true that we don't immediately support all  
features that Delphi has, but that's not because we refuse to support  
them. It's simply because in an open source project the only features  
that get supported are the ones that people write patches for (and  
these people can be anyone).


For the same reason, not spending time on FPC features would not  
automatically mean that support for Delphi features would be  
implemented sooner: in an open source project, people primarily work  
on what they care about themselves.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Delphi mode for new features?

2015-07-02 Thread Serguei TARASSOV

On 02/07/2015 10:32, fpc-pascal-requ...@lists.freepascal.org wrote:

Date: Wed, 1 Jul 2015 17:51:43 +0200
From: Jonas Maebe
To: FPC-Pascal users discussions
Subject: Re: [fpc-pascal] Delphi mode for new features?


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".


This is another good example of divergence that complicates the life.

Object type can be used as "advanced record" in FPC mode only.
I'm agreed that it is good evolution since turbo pascal.
But in Delphi mode you cannot use object type in a same manner (i.e. for 
operator overloading) and then should use advanced records.
As result, when the same unit should be compiled with both Delphi and 
FPC, you cannot use the power of both languages but only subset of them.


Be honest, I have doubts about "Pascal spirit" of this genre.

Regards,
Serguei


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Delphi mode for new features?

2015-07-02 Thread Michael Schnell

On 07/01/2015 05:40 PM, Serguei TARASSOV wrote:
Are you agreed that more FPC is compatible with Delphi "by default", 
more users can use it without troubles and learning additional docs? 
Delphi is getting so horribly expensive (without noticeable benefit) 
that the user base is going to shrink dramatically. Hopefully some wile 
come over to fpc.


-Michael
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Delphi mode for new features?

2015-07-02 Thread Michael Schnell

On 07/01/2015 05:51 PM, 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
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Delphi mode for new features?

2015-07-01 Thread Graeme Geldenhuys
On 2015-07-01 16:47, 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/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Delphi mode for new features?

2015-07-01 Thread Jonas Maebe
On 01/07/15 17:40, Serguei TARASSOV wrote:
> On 01/07/2015 17:08, fpc-pascal-requ...@lists.freepascal.org 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
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Delphi mode for new features?

2015-07-01 Thread Michael Van Canneyt



On Wed, 1 Jul 2015, Serguei TARASSOV wrote:


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.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Delphi mode for new features?

2015-07-01 Thread Serguei TARASSOV

On 01/07/2015 17:08, fpc-pascal-requ...@lists.freepascal.org wrote:

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:
<20150701165430.horde.fbbhakisjlfvk-8mgx33...@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
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Delphi mode for new features?

2015-07-01 Thread Graeme Geldenhuys
On 2015-07-01 15:54, Jonas Maebe wrote:
> all new language features we add these days can be selectively enabled  
> and disabled via mode switches.

That was/is a very good decision, and makes it quite flexible per project.

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Delphi mode for new features?

2015-07-01 Thread Jonas Maebe


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.



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
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal