[Lazarus] Delphi post-XE3 roadmap

Graeme Geldenhuys graeme at geldenhuys.co.uk
Wed Aug 29 12:02:00 CEST 2012


On 29/08/12 10:54, Michael Schnell wrote:
>
> If that library is working, to make it really usable, I suppose some
> compiler magic is necessary to allow for using these lStrings with the
> syntax we know for String

In the end that would probably be the case... Just like Qt and Java 
implemented some compiler magic to do exactly what you described.

In the mean time I created various constructor to the TString class that 
takes AnsiString, PChar, WideString, UnicodeString as initial data. I've 
also implemented overloaded "helper" functions that instantiates the 
TString class and returns a IString reference.

eg:

   var
     lMyString: IString;
   begin
     lMyString := s('Some string data');
     ...
   end;


s() being the helper function, instead of having to write 
TString.Create('Some string data'); At least it is slightly less code to 
type. :)


      Graeme.





More information about the Lazarus mailing list