[fpc-devel] bug report 20473: Please add a directive to define string=utf8string

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Thu Oct 13 10:14:09 CEST 2011


On Thu, Oct 13, 2011 at 9:43 AM, Sven Barth <pascaldragon at googlemail.com> wrote:
> 1. Currently there is this huge work going on to get trunk to a reasonable
> and usable shape again and until that is done (and maybe RTL changes as
> well) it is (in my opinion (!) ) not reasonable to think about changing the
> meaning of "string" at all.

It does not change the meaning of string everywhere, just in 1 source
file at a time.

> 2. As Marco wrote in this mail
> http://lists.freepascal.org/lists/fpc-devel/2011-October/026667.html it is
> not free of problems to just change the default meaning of "string" using a
> define, switch, compiler option or whatever.

I would say that people that use the define then can deal with the
problems which it causes. For me it causes much less work then to
rename everywhere with "string"

There is no easy way out, but I think that the directive solution
would work well for Lazarus apps.

For inheritance we could define in system something like:

RTLString = string;

It would not need to be used anywhere in the RTL, but files which use
the utf8string directive can use this string type to reffer to the RTL
string type.

-- 
Felipe Monteiro de Carvalho



More information about the fpc-devel mailing list