Actually, the best idea would be to enable full reflection (much more
complete, then what we have now) by default and allow to remove it on
demand.
Just like the methods being virtual by default, but with ability to
make them final.

On Fri, Oct 21, 2011 at 10:29 AM, Jacob Carlborg <d...@me.com> wrote:
> On 2011-10-20 19:36, Steven Schveighoffer wrote:
>>
>> On Thu, 20 Oct 2011 12:26:29 -0400, Jacob Carlborg <d...@me.com> wrote:
>>
>>> On 2011-10-20 16:20, Steven Schveighoffer wrote:
>>>>
>>>> On Thu, 20 Oct 2011 10:07:12 -0400, Gor Gyolchanyan
>>>> <gor.f.gyolchan...@gmail.com> wrote:
>>>>
>>>>>> D's runtime type info is very limited, so you may not be able to get
>>>>>> what you are looking for.
>>>>>
>>>>> D's compile-time type info is very rich and it's easy to remember it
>>>>> for run-time use.
>>>>
>>>> Yes, but you have to do some funky stuff to link it to the typeinfo.
>>>> Compare this to other languages where the compiler generates a very rich
>>>> set of runtime info (e.g. Java).
>>>>
>>>> I think actually, the runtime info generated by the compiler is seldom
>>>> used (except for maybe dynamic casting), and just creates bloat.
>>>>
>>>> I envision in the future, the runtime info generated would be triggered
>>>> by an annotation like @rtti("functions", "fields", "inheritance"). That
>>>> would give us a good hook to selectively generate rtti when it makes
>>>> sense.
>>>>
>>>> -Steve
>>>
>>> And the you get big problems when you want to use the runtime info of
>>> a type you don't control and it doesn't use that attribute.
>>
>> Big problems being, things are null? So? Right now, there's almost no
>> RTTI, and we do just fine.
>>
>> -Steve
>
> I got the impression that you suggested that the current RTTI should be
> removed and only be available if you're using the @rtti attribute.
>
> --
> /Jacob Carlborg
>

Reply via email to