[fpc-devel] strings: a proposeal

Jonas Maebe jonas.maebe at elis.ugent.be
Sun Feb 4 12:38:19 CET 2007


On 04 Feb 2007, at 12:01, Daniƫl Mantione wrote:

> Op Sun, 4 Feb 2007, schreef Florian Klaempfl:
>
>>> - No unique check by assigning to character.
>>
>> True. But maybe we should simply allow to overload [] then.
>
> Not necessary, wrap it into an object and define a default property.

Then you can't take the address anymore of individual characters, as  
Thorsten mentioned on irc last night. E.g. this will not have the  
desired effect:

move(mystringobj[1],chararray,mystringobj.len)

But in general I dislike allowing to overload everything but the  
kitchen sink, otherwise we'll end up with C++ (which does allow you  
to overload pretty much every operator/token, meaning that you always  
have to read each and every header and carefully look at each type  
before you have any idea at all about what a certain expression could  
mean).


Jonas


More information about the fpc-devel mailing list