The challenges of writing a Delphi/Object Pascal to C++ compiler.

I am seriously considering writing a Delphi-to-C++ compiler that is 99% compatible with Delphi XE6.

I’m finding FreePascal to be a bit frustrating, in different ways than the Delphi compiler is frustrating.  Embarcadero’s 64-bit compiler has recently profoundly let me down with it’s lack of optimization, while FPC is a maze to navigate and I keep getting random “Fatal: Compilation Aborted” messages that offer no indication to the what the real issue is.

I like to complain a lot that Delphi’s generic support is limited and incomplete, well… I’m finding that FreePascals generic support is even more limited and more incomplete, and the popular Lazarus IDE doesn’t really fully embrace the 2.7.1 compiler in its latest version (am I forced to run an older branch?).   I have a lot of code that relies on the elegance that generics can bring to the table. I’d use generics more if either language had a robust implementation of generics. C#, for example, makes great use of generics. FPC supports Generic Classes, but not generic methods at this time. Delphi supports generic methods, but only when attached to a class, there are no generics allowed on global functions. Furthermore there is no proper way to properly reference a generic record because records do not support Interfaces and Interfaces are the way that constraints are expressed in Delphi Generics. I’m tired of a lack of progress by Embarcadero and the community really. I can do this… and it can be good. Continue reading The challenges of writing a Delphi/Object Pascal to C++ compiler.

Embarcadero’s Mobile Offering is Still a Shameful, Overpriced Pile of Crap.

I have sat here over the last 2 hours trying to get my old source running cross platform on my new Android tablet, compiled with Delphi XE6, in vain.  Some issues at fault are that the Delphi XE5 units and libraries were so completely immature that they have lots of linkage problems to XE6, even though Xe6 is really just a minor upgrade from XE5.   XE4, 5, and 6 were each released just 6-months apart, which is unheard of for any company serious about its products.

Whereas I appreciate the opportunity to try them out sooner rather than later, I also wish I didn’t blow $1,500 on software that just plain doesn’t friggen work.

One source of resentment is that all my legacy code must be painstakingly refactored to allow for 0-based strings, lack of ansistring support, and Embarcadero’s ridiculous design decision to move all objects to automatic reference counting.  Everything must change… all the little functions that work with streams must be changed and verified, every function you ever wrote for string manipulation must be verified… not only every single object must be verified and refactored, but every single use case of every single object must be verified and/or refactored and code must be IFDEFed all over the place deal to with subtle incompatibilities. Given the amount of changes that I’d have to make to get some things working, I didn’t expect things to work right away.  But…

Continue reading Embarcadero’s Mobile Offering is Still a Shameful, Overpriced Pile of Crap.