[fpc-pascal] some new features to delphi prisem

Michalis Kamburelis michalis.kambi at gmail.com
Sun Feb 21 19:29:54 CET 2010

Graeme Geldenhuys wrote:
> On 21 February 2010 17:00, Michalis Kamburelis <michalis.kambi at gmail.com> wrote:
>> Which also means "less chance of mistake". For example, if you decide
>> later to change "y" to "y1", you only have to change the code in one
>> place, not three.
> Unfortunately you are wrong Michalis. Ever heard of 'syncron-edit'?
>   http://wiki.freepascal.org/New_IDE_features_since#Syncron-Edit
> You only need to change one variable, and all other instances will
> change to. And syncron-edit applies to any selection of text. So
> already works in more cases.

Which is cool, but only if you and all your contributors use Lazarus for
all your editing. The fact that Lazarus makes something easier should
not be a reason to reject the language feature.

> I vote against adding this language feature. It's not pascal-like and
> actually makes the code harder to read. It also only applies to simple
> assignment. Case begin..end blocks can do much more than simple
> oneliners.

This is a matter of taste, I can imagine uses when at least functional
"if" would make code *more* readable. Noone forces programmers to
convert all their case/if to functional versions if they look
unreadable. The functional variants are supposed to be used in
particular situations, when they make sense.

Mind you, I'm not saying I'm a fan or a big proponent of this feature.
I do not own Delphi since a long time, being happy with FPC, so I'm also
not interested in compatibility.

Mostly, I'm playing devil's advocate here :), and I didn't see yet
a good argument against this feature (and I see cases when it would be
useful). The fact that it makes some cases less readable doesn't count
here imho (because it's optional, and can make other code more readable).


More information about the fpc-pascal mailing list