[fpc-pascal] Bls: Bls: Quick Modern Object Pascal Introduction, for Programmers

Michalis Kamburelis michalis.kambi at gmail.com
Tue Jun 21 15:20:07 CEST 2016


2016-06-21 15:03 GMT+02:00 Sven Barth <pascaldragon at googlemail.com>:
> Am 21.06.2016 12:31 schrieb "Michalis Kamburelis"
> <michalis.kambi at gmail.com>:
>> Current FPC defaults:
>>
>> - Help people who except the {$mode fpc} to be default (so they write
>> code without classes and a lot of other new features),
>> - Or people who expect that string is by default ShortString (limited
>> to 255 chars).
>
> One might argue about changing the default mode, but changing the default
> String type of mode ObjFPC will very likely result in compilation or runtime
> errors (probably even in the compiler itself) which is something we tend to
> avoid without good reasons. At the very least there will be performance
> differences which - depending on the code - might be noticeable as well.
>

These errors and differences will be only felt by projects that use
{$mode objfpc} but assume that string = ShortString (and they don't
use {$H-} explicitly). I don't think it would apply to too many
projects?

And if we do it in some major version, with proper release notes, like
Mr Bee proposes, these projects would have plenty of time to adjust
their compilation scripts / config files. They could just add "-Sh-"
or "{$H-}" and be OK, for both past and future FPC versions.

Regards,
Michalis



More information about the fpc-pascal mailing list