[fpc-pascal] Seems Delphi is moving to Java-style primitive types

Graeme Geldenhuys graeme at geldenhuys.co.uk
Wed Oct 17 11:00:34 CEST 2012


Well, kind-of... I don't know if C# also supports this (like Java). It
probably does, because for the last few years, Delphi has just been
copying whatever is in C#. [sad]


eg: This compiles and works in Delphi XE3.

   ShowMessage('Hello World!'.ToUpper);

And there are lots more string functions (like .ToUpper) out of the box.


http://www.youtube.com/watch?v=ndeJeBdZQIw&feature=share&list=UUStifH8LUsnsTQNcT_BDTVw

It actually uses record helpers, but the end result looks very much like
Java primitive types where you have <type>.ToString, <type>.Equals,
<type>.Split etc...

Interesting.

Regards,
  - Graeme -




More information about the fpc-pascal mailing list