On 04/16/2012 10:51 PM, Walter Bright wrote:
On 4/16/2012 11:42 AM, Jacob Carlborg wrote:
On 2012-04-16 18:53, Walter Bright wrote:
On 4/16/2012 9:40 AM, Jacob Carlborg wrote:
Regardless of how the runtime reflection is generated, by a library or
the
compiler, it needs to be available to all types.

Why?

(I can see the point for a dynamic language, but not a static one.)

The standard example that comes back is serialization. That can be
done without
support for runtime reflection but not as good as with the support. As
far as I
know it's impossible to serialize through a base class reference without
registering the subtype with the serializer, if runtime reflection
isn't available.


Serialization does NOT need to deal with all types, only the types that
are to be serialized.

That is certainly true. Full runtime reflection is a sufficient, but not a necessary solution.

The issue to be solved is that it is inconvenient and possibly error prone to manually annotate all types that need specialized runtime type info. Eg. If a class subclasses a serializable class, then by default the subclass should be fully serializable without further action.

Reply via email to