Recent

Author Topic: The ever re-appearing /= question.  (Read 7416 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 19268
  • Glad to be alive.
Re: The ever re-appearing /= question.
« Reply #15 on: April 01, 2026, 02:37:28 pm »
I know, Marco, but still it is a fix, not a feature. We both were there before 2000 and probably did not pay attention. As a user, at that point in time, I was not critical enough, I confess.
objects are fine constructs. You can even initialize them with constructors.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12901
  • FPC developer.
Re: The ever re-appearing /= question.
« Reply #16 on: April 01, 2026, 02:38:52 pm »
I know, Marco, but still it is a fix, not a feature. We both were there before 2000 and probably did not pay attention. As a user, at that point in time, I was not critical enough, I confess.

It was not there, now it is. Sounds like a feature to me.

Thaddy

  • Hero Member
  • *****
  • Posts: 19268
  • Glad to be alive.
Re: The ever re-appearing /= question.
« Reply #17 on: April 01, 2026, 02:42:55 pm »
@Marcov

How? What was there was a bug, now it is fixed. (It was a breach of contract)
Whoever wrote it (Daniel, maybe?) probably intended to write the feature in full. This is still not the case, hence my insistance. This is rather assumptious, I know.

Otherwise all bug fixes are features, did you think about that when you wrote that? (Although that would be "Delphi compatible"  :D )
« Last Edit: April 01, 2026, 02:53:53 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

PascalDragon

  • Hero Member
  • *****
  • Posts: 6397
  • Compiler Developer
Re: The ever re-appearing /= question.
« Reply #18 on: April 02, 2026, 09:27:40 pm »
I feel very strongly about this and need your support to get this applied:

You can gather all the support you want. The answer is and stays no.

I suggest that {$coperators on} are deprecated in upcoming FPC 4.0. :)

While I am very tempted to do just that or at least to throw out the -Sc from the default fpc.cfg marcov is also right that this is not very realistic. Keeping them in does however not mean that we'll extend them in any way. They should not have been added in the first place and also shouldn't have been added to the default fpc.cfg.

Thaddy

  • Hero Member
  • *****
  • Posts: 19268
  • Glad to be alive.
Re: The ever re-appearing /= question.
« Reply #19 on: April 03, 2026, 07:32:29 am »
@PascalDragon

Frankly I agree with you as you know: but the patch is a bug-fix for something we both did not want and you can't remove it, so why don't fix it? The patch is sound, well tested and has no impact apart from fixing the behavior to be compatible with the contract that it behaves like C.

Meaning I take no for an answer as in the feature should not be there, but I refuse to take it as a bug fix. That is incoherent.
It is a FIX, not a feature. At least try the patch yourself.

Why would you leave in malfunctioning code?
Either remove it (you have my vote!) or apply the fix.

Anyway, I feel that only a substantial bribe over a sumptuous dinner with many others of the core team present would help convince you?  O:-) O:-)

But really, this is just emotion over technical merit and you are usually so precise (as I am about the fix, no noticeable incoherence this time  %) ) in such matters.
« Last Edit: April 03, 2026, 07:54:42 am by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

440bx

  • Hero Member
  • *****
  • Posts: 6533
Re: The ever re-appearing /= question.
« Reply #20 on: April 03, 2026, 07:44:15 am »
I feel the same way as @dbannon on this one.  Repurposing "/" to mean division for both integers and floats only creates confusion, incompleteness and possible ambiguities because then "div" is superfluous and "/" becomes ambiguous because it is associated with both integers and floats.

That's just a mess.  I wouldn't touch that one with a 10 foot pole.

C operators are already a mostly unwelcome feature in the language, adding a black sheep to that family is not a good idea.

Best thing is to leave the thing alone.  Cut your losses, live and learn.
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 19268
  • Glad to be alive.
Re: The ever re-appearing /= question.
« Reply #21 on: April 03, 2026, 08:03:59 am »
It is an unwelcome feature just like inline var, but the design promise is that the {$coperators} work like, surprise..... C!!!! That is the design, but half-implemented in the case of the compound division /=. This is not a feature but a fix for something many of us did not want in the first place.
I might add that the issue was also controversial in C for the same reasons:
You could not write int /=float for many decades because it means the explicit truncation and you had to truncate in normal C notation.
Just like I did: int/float is trunc(int / float).
This is not merely semantics: if you promise that for the purpose of translating C code to Pascal the compiler accepts C style operators, at least make sure they work. I am not asking for new extended C operator features, I am asking to fix an existing one, nothing more, and I did so.

I am waiting for the next episode of ..... Soap.
https://www.youtube.com/results?search_query=confused+you+will+be+after+the+next+episode+of+soap
« Last Edit: April 03, 2026, 08:12:31 am by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8572
Re: The ever re-appearing /= question.
« Reply #22 on: April 03, 2026, 08:35:27 am »
While I am very tempted to do just that or at least to throw out the -Sc from the default fpc.cfg marcov is also right that this is not very realistic. Keeping them in does however not mean that we'll extend them in any way. They should not have been added in the first place and also shouldn't have been added to the default fpc.cfg.

Would it be feasible to compromise and only allow them to be applied to constants, i.e. /= 2 etc.?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Thaddy

  • Hero Member
  • *****
  • Posts: 19268
  • Glad to be alive.
Re: The ever re-appearing /= question.
« Reply #23 on: April 03, 2026, 08:55:37 am »
That works: the code path is rather simple, but it would take *a lot* more code to only accept constants. Your case it catered for, because the code path doesn't change. (That's to some extend the beauty)
objects are fine constructs. You can even initialize them with constructors.

mercurhyo

  • Sr. Member
  • ****
  • Posts: 265
Re: The ever re-appearing /= question.
« Reply #24 on: April 03, 2026, 03:19:34 pm »
Code: Pascal  [Select][+][-]
  1. {$TROLLMODE ON} // See https://wiki.freepascal.org/ ahahahahah
  2. // New features don't necessarily mean a better future.
  3. // They always complain about wanting new language features.
  4. // It sounds like idiotic echoes!
  5. // Pascal needs no new features to remain GREAT —
  6. // just good vibes and passionate "D"evelopers!
DEO MERCHVRIO - Fedora PlasmaKDE, Win11pro - Ryzen9XT+Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

Thaddy

  • Hero Member
  • *****
  • Posts: 19268
  • Glad to be alive.
Re: The ever re-appearing /= question.
« Reply #25 on: April 03, 2026, 04:03:13 pm »
Code: Pascal  [Select][+][-]
  1. {$TROLLMODE ON} // See https://wiki.freepascal.org/ ahahahahah
  2. // New features don't necessarily mean a better future.
  3. // They always complain about wanting new language features.
  4. // It sounds like idiotic echoes!
  5. // Pascal needs no new features to remain GREAT —
  6. // just good vibes and passionate "D"evelopers!
There is no new feature.
 It is a bug fix.
A breach of a promise that /= works like C.
It is also in line with {$coperators on} and only follows its original premise: ihelps translating C code.
Nothing more, nothing less.

For the umptiest time.

Reading is an art, it seems.....
>:D >:D >:D >:D >:D >:( >:( >:(

Half of you can not even see it is a bug fix instead of a new feature.
Otherwise every bug fix is a feature. O:-) O:-) O:-)

Such stupidity makes me cry (virtually, don't worry), trolling or not...

I don't like the feature, but when you also decide that the feature won't be removed then at least FIX THE BUG!!! in that unwanted feature.
« Last Edit: April 03, 2026, 04:12:37 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

mercurhyo

  • Sr. Member
  • ****
  • Posts: 265
Re: The ever re-appearing /= question.
« Reply #26 on: April 03, 2026, 04:07:01 pm »
@Thaddy
 :D :D :D :D :D :D :D :D :D :D :D :D :D :D
See? I also can use smileys !
DEO MERCHVRIO - Fedora PlasmaKDE, Win11pro - Ryzen9XT+Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

Thaddy

  • Hero Member
  • *****
  • Posts: 19268
  • Glad to be alive.
Re: The ever re-appearing /= question.
« Reply #27 on: April 03, 2026, 04:12:55 pm »
 :o :o %)

But do you understand the difference between a bug fix and a feature.....

In my opinion IQ levels are below the new Trump mark and that is below Kelvin.
« Last Edit: April 03, 2026, 04:15:23 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

mercurhyo

  • Sr. Member
  • ****
  • Posts: 265
Re: The ever re-appearing /= question.
« Reply #28 on: April 03, 2026, 04:14:47 pm »
 :D :D :D :D :D :D :D :D :D :D :D :D
No ! I started programming 5 mins and a half earlier, sir.
DEO MERCHVRIO - Fedora PlasmaKDE, Win11pro - Ryzen9XT+Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

Thaddy

  • Hero Member
  • *****
  • Posts: 19268
  • Glad to be alive.
Re: The ever re-appearing /= question.
« Reply #29 on: April 03, 2026, 04:18:27 pm »
Ok, what is the difference between a bug fix and a feature?
Explain why I am wrong. You can't...
objects are fine constructs. You can even initialize them with constructors.

 

TinyPortal © 2005-2018