[fpc-pascal] The new Delphi compatible unicode string

Andreas Schneider aksdb at gmx.de
Tue Jan 4 18:09:45 CET 2011


 On Tue, 4 Jan 2011 14:20:55 +0200, Juha Manninen wrote:
>
> If I told to a Java programmer that Object Pascal features match Java
> features, how would I prove it? By showing him the HTML component 
> code?
>
> IFDEFs and self-made conversion funcs just to support different 
> string types.
> The Java guy would ask if there is any common unicode string type. I
> would say
> "Not yet but it's coming, but we can't use it because we must support
> the old
> compiler versions".
>
> The code also has lots of containers and thousands of typecasts to 
> access
> their elements which could be eliminated by using generics 
> containers.
> I would explain to the Java person: "Object Pascal already has
> generics but we
> can't use them because we must support the historical Pascal syntax".
>
> I would also laugh if I was the Java developer.
> So, the minimum requirements for the modernized HTML component would
> be Delphi
> 2009 / FPC with the new unicode support.

 If a Java developer ever pulls that argument, slap him in the face. 
 Just look at some of the common Java libraries ... for example SWT. It 
 is probably still compatible to Java 1.4 or even 1.3 (hell it could even 
 be 1.2). For that reason it doesn't use generics and not even enums 
 (which came with Java 1.5 ... yeah, no real type safety in that regard 
 until then). It also took until Java 1.5 to have a for-each loop, so 
 even in that regard FPC isn't really behind.

 But Java is a bad example anyway ... if you read the fine "Execution in 
 the Kingdom of Nouns"[1] by Steve Yegge, FPC will get a pretty good look 
 ;-) (Although he doesn't mention FPC, the points he makes with C++ match 
 FPC just as well).

 Best Regards,
 Andreas.


 [1] 
 http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html



More information about the fpc-pascal mailing list