4 ms·
There is a TS for reflection, but reflection is really not part of the compiled-to-native language paradigm.
by bregma 3y ago
There is a TS for reflection, but reflection is really not part of the compiled-to-native language paradigm.
- badsectoracula 3y agoThat is a C++ limitation, not a limitation of compiled languages. Object Pascal had the ability to describe its own types since Delphi 1.0 under Windows 3.1, it is how object serialization works (forms, controls and other components are just object instances serialized to/from disk). This is data the compiler already has in memory, having some method to save that data to the final executable and a few functions in the standard library to parse that data and give back meaningful results shouldn't really be that much of an effort (and still be very portable), and yet for some reason C and C++ do not provide it even though other languages did decades ago.
- pjmlp 3y agoPlenty of compiled-to-native language support reflection, Simula being one of the first ones. Mesa, Eiffel, D, Mesa/Cedar, Delphi, Oberon, Oberon-2, Active Oberon, Clipper, Visual Basic, Component Pascal, Modula-3,... are all compile to native languages with reflection, and the list isn't even exaustive.