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

Sven Barth pascaldragon at googlemail.com
Tue Jun 21 17:16:20 CEST 2016

Am 21.06.2016 15:21 schrieb "Michalis Kamburelis" <michalis.kambi at gmail.com
> 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
> > String type of mode ObjFPC will very likely result in compilation or
> > 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?

Compiler and RTL are two examples.

> 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.

It was decided some time ago when mode Delphi was switched to H+ (due to
Delphi compatibility) that mode ObjFPC won't be switched, cause for that
mode we value backwards compatibility higher than the user not having to
write a switch.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20160621/ddcb8122/attachment.html>

More information about the fpc-pascal mailing list