Hacker News new | ask | show | jobs
by badsectoracula 3167 days ago
Sometimes i wonder how hard it would be to make some C++ Builder-like modifications to Clang (like Embarcadero did for newer C++ Builder versions) to allow it use Free Pascal objects directly for people who really want to avoid Pascal.

Of course to do it properly it'd need:

* A modified Clang (or other C++ compiler) that can use .ppu files with the necessary C++ language extensions for properties, callbacks, sets, enhanced RTTI, etc

* A C/C++ library that uses the Free Pascal RTL for all memory operations

* Lazarus' CodeTools to add C++ support for automatically creating missing event handler code (and removing unnecessary code), handling syntax completion, code completion for missing identifiers, property getters/setters and private fields, inherited fields, etc to the same standard as the Free Pascal code

* All the involved teams to agree to play nice with each other :-P

Also if such a thing would be done, judging from what most Lazarus and FPC devs do so far, it'd probably be done in a way that is as compatible with C++ Builder as possible.

TBH i don't really hold my breath, but who knows, weird stuff has happened before in both FPC and Lazarus :-P