|
|
|
|
|
by rbanffy
1005 days ago
|
|
I really, really, am baffled at how difficult it seems to have a GUI builder tool that outputs a description of the UI that a program can just load (or a compiler transform into a structure inside the program) as objects the program can use, handling events and pushing presentation information into it. That was pretty much what VB did, with immense success. |
|
There is almost no UI-specific functionality there, the same functionality can be used to serialize any type of object and you can even implement your own serialization logic for your objects. The language's RTII allows for declaring properties (think like C# properties, though really C# properties were inspired by Delphi properties as the latter had them since the original Delphi 1.0 for Windows 3.1) as part of a class and has support for metaclasses (classes are instances themselves of a metaclass that describes the class), including virtual constructors (since classes are instances they have their own VMT) which allows for constructing class instances on the fly by passing a class type in a function.
The thing is, C++ does not have this sort of functionality. You can implement your own RTTI, as several projects do (many game engines do that for example), but it is often clunky (e.g. relies on macros, duplicating info, manual registration and/or external tools that parse the code and generate the RTTI boilerplate).
C++ Builder did it because it extended C++ to add that functionality in a way that is ABI compatible with Delphi - and is how it can use VCL (which is written in Delphi).