Sign in Join

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

Mailing lists / fpc-pascal / 2016-02

Re: New feature: IfThen() intrinsic

7 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 13 lines
Date: Tue, 02 Feb 2016 10:32:28 -0200 From: Andreas Berger On Tue 02/02/2016 09:27, Jonas Maebe wrote: > > > >The parameter evaluation order issue is irrelevant in this context: > >Delphi guarantees left-to-right (or used to anyway, this may have > >changed), FPC doesn't guarantee anything. > > Wow, what's this? I never knew this. I have been using Borland products since TP 1.0 and for me left-to-right is automatic, I don't even think about it. If FPC doesn't guarantee this my code is full of potential problems.

You confuse left-to-right operator's precedence with function arguments evaluation.

Regards,
Serguei

Reply by email

Serguei TARASSOV
Show quoted text 21 lines
Date: Tue, 02 Feb 2016 13:22:01 +0100 From: Jonas Maebe Michael Van Canneyt wrote on Tue, 02 Feb 2016: [evaluating all arguments to a function/intrinsic] > >I'm just trying to to put any foaming-at-the-mouth argumentation > >using this particular argument in perspective. I think this is rather disingenuous after your own foaming-at-the-mouth hyperbole (?) of reverting all changes and temporarily shutting down the svn server if someone else did something that you considered to be fundamentally wrong. > >For a correct understanding: The compiler must behave predictable at all > >times, no arguing there. But I don't think that iif() having different > >semantics than all other functions, is a problem. Including all other functions called iif(). > >It just needs to be > >documented properly. It is a non-issue for me. It is a deal breaker for me.

Completely agreed with Jonas.
I'm afraid to stay with FPC 2.6 for the near future and support Delphi compatibility.
Seems, the guys from GNU C are more responsible because of many mission-critical code compiled with.

Regards,
Serguei

Reply by email

Andreas Berger
to Serguei TARASSOV: You confuse left-to-right operator's precedence with function arguments evaluation.…
Serguei TARASSOV wrote 17 lines
On 02/02/2016 13:41, wrote: > Date: Tue, 02 Feb 2016 10:32:28 -0200 > From: Andreas Berger > > On Tue 02/02/2016 09:27, Jonas Maebe wrote: >> > >> >The parameter evaluation order issue is irrelevant in this context: >> >Delphi guarantees left-to-right (or used to anyway, this may have >> >changed), FPC doesn't guarantee anything. >> > > Wow, what's this? I never knew this. I have been using Borland products > since TP 1.0 and for me left-to-right is automatic, I don't even think > about it. If FPC doesn't guarantee this my code is full of potential > problems. You confuse left-to-right operator's precedence with function arguments evaluation.

You are totally correct Serguei, I overlooked the parameter evaluation and saw operator precedence. My code is safe :)
Sorry everyone for my posts.

Show quoted text 6 lines
Regards, Serguei _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email

Michael Van Canneyt
to Serguei TARASSOV: Completely agreed with Jonas. I'm afraid to stay with FPC 2.6 for the near future and…
Serguei TARASSOV wrote 27 lines
On 02/02/2016 13:41, wrote: > Date: Tue, 02 Feb 2016 13:22:01 +0100 > From: Jonas Maebe > > Michael Van Canneyt wrote on Tue, 02 Feb 2016: > > [evaluating all arguments to a function/intrinsic] >> >I'm just trying to to put any foaming-at-the-mouth argumentation >> >using this particular argument in perspective. > I think this is rather disingenuous after your own > foaming-at-the-mouth hyperbole (?) of reverting all changes and > temporarily shutting down the svn server if someone else did something > that you considered to be fundamentally wrong. > >> >For a correct understanding: The compiler must behave predictable at all >> >times, no arguing there. But I don't think that iif() having different >> >semantics than all other functions, is a problem. > Including all other functions called iif(). > >> >It just needs to be >> >documented properly. It is a non-issue for me. > It is a deal breaker for me. Completely agreed with Jonas. I'm afraid to stay with FPC 2.6 for the near future and support Delphi compatibility. Seems, the guys from GNU C are more responsible because of many mission-critical code compiled with.

The least we can say is that the subject is controversial.

The prudent course is then to remove it from the compiler (or put it in a branch) till emotions have calmed down and a satisfying solution was found.

Michael.

Reply by email

Sven Barth
to Serguei TARASSOV: You confuse left-to-right operator's precedence with function arguments evaluation.…
"Serguei TARASSOV" wrote 21 lines
On 02/02/2016 13:41, wrote: > > Date: Tue, 02 Feb 2016 10:32:28 -0200 > From: Andreas Berger > > > On Tue 02/02/2016 09:27, Jonas Maebe wrote: >> >> > >> >The parameter evaluation order issue is irrelevant in this context: >> >Delphi guarantees left-to-right (or used to anyway, this may have >> >changed), FPC doesn't guarantee anything. >> > > > Wow, what's this? I never knew this. I have been using Borland products > since TP 1.0 and for me left-to-right is automatic, I don't even think > about it. If FPC doesn't guarantee this my code is full of potential > problems. You confuse left-to-right operator's precedence with function arguments

evaluation.

No, he does not. Delphi and TP indeed guarantee an evaluation(!) from left to right.

Regards,
Sven

Reply by email

Sven Barth
to Serguei TARASSOV: Completely agreed with Jonas. I'm afraid to stay with FPC 2.6 for the near future and…
"Serguei TARASSOV" wrote 20 lines
On 02/02/2016 13:41, wrote: > > Date: Tue, 02 Feb 2016 13:22:01 +0100 > From: Jonas Maebe > > Michael Van Canneyt wrote on Tue, 02 Feb 2016: > > [evaluating all arguments to a function/intrinsic] > >> >I'm just trying to to put any foaming-at-the-mouth argumentation >> >using this particular argument in perspective. > > I think this is rather disingenuous after your own > foaming-at-the-mouth hyperbole (?) of reverting all changes and > temporarily shutting down the svn server if someone else did something > that you considered to be fundamentally wrong. > > >> >For a correct understanding: The compiler must behave predictable at

all

Show quoted text 13 lines
>> >times, no arguing there. But I don't think that iif() having different >> >semantics than all other functions, is a problem. > > Including all other functions called iif(). > > >> >It just needs to be >> >documented properly. It is a non-issue for me. > > It is a deal breaker for me. Completely agreed with Jonas. I'm afraid to stay with FPC 2.6 for the near future and support Delphi

compatibility.

Seems, the guys from GNU C are more responsible because of many

mission-critical code compiled with.

More responsible?! Apparently you haven't read the one or other report where they f***ed up some code, because they added optimizations that did the wrong(TM) thing.
I'll have to check whether I can find that example again...

Regards,
Sven

Reply by email

Marco van de Voort
to Michael Van Canneyt: The least we can say is that the subject is controversial. The prudent course is then to…

In our previous episode, Michael Van Canneyt said:

Show quoted text 15 lines
>> Including all other functions called iif(). >> >>> >It just needs to be >>> >documented properly. It is a non-issue for me. >> It is a deal breaker for me. > Completely agreed with Jonas. > I'm afraid to stay with FPC 2.6 for the near future and support Delphi > compatibility. > Seems, the guys from GNU C are more responsible because of many > mission-critical code compiled with. The least we can say is that the subject is controversial. The prudent course is then to remove it from the compiler (or put it in a branch) till emotions have calmed down and a satisfying solution was found.

Same as the discussions about the releasing of interfaces.

Reply by email