compiler support added for precise GC

Alex Rønne Petersen xtzgzorex at gmail.com
Mon Apr 16 09:37:15 PDT 2012


On 16-04-2012 13:34, deadalnix wrote:
> Le 16/04/2012 13:24, Jacob Carlborg a écrit :
>> On 2012-04-16 11:00, Walter Bright wrote:
>>> On 4/16/2012 1:20 AM, Jacob Carlborg wrote:
>>>> I thought it was a first step for runtime reflection.
>>>
>>> The thing about runtime reflection is you only need it for a few
>>> classes, while the compiler is doomed to generate the info for all of
>>> them. Andrei suggested a better design, which was to use compile time
>>> reflection to generate runtime information, as a library routine, on an
>>> as-needed basis.
>>
>> If we can't relay on runtime reflection being there it's basically
>> useless. It's like your idea that the GC shouldn't be optional. Then all
>> library code needs to be written to work without the GC. It's the same
>> thing with runtime reflection.
>>
>
> This is a lib issue. phobos should provide a standard way to do
> compiletime -> runtime reflection so each lib doesn't need to provide
> its own way every time.

I think you're misunderstanding.

The point is that without built-in runtime reflection, reflection is 
only available for select classes that the programmer specifically asks 
to have RTTI for. This is useless. It doesn't enable discovery-based 
reflection at all, which is what makes runtime reflection in C#, Java, 
... so useful.

-- 
- Alex


More information about the Digitalmars-d mailing list