[fpc-devel] Proposal: Enhanced replacement for assignment operators

Alexander Klenin klenin at gmail.com
Fri Aug 6 06:16:21 CEST 2010


On Fri, Aug 6, 2010 at 14:08, Marco van de Voort <marcov at stack.nl> wrote:
> In our previous episode, Alexander Klenin said:
>> > as this diminish the readability.
>>
>> FWIW, while migrating to FPC/newer Delphi,
>> I specifically replace all usage of Inc/Dec and Include/Exclude in my
>> Pascal programs
>> by += / -= *to increase readability*.
>> And I think it really helps ;-)
>
> I think they are unreadable,

C-like operators reduce the number of required punctuation --
I always think that the extra punctuation is bad for readability.

As for multiplication, floating-point and overloaded cases,
they are simply required since Inc and Dec do not work at all.

>but a great help when translating C code.

This is another argument supporting the notion that assignment operators
should be extended to include div, mod and logical operators.

-- 
Alexander S. Klenin



More information about the fpc-devel mailing list