The Final(ize) Challenge

Steven Schveighoffer schveiguy at yahoo.com
Mon May 18 12:35:55 PDT 2009


On Mon, 18 May 2009 14:37:51 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> Steven Schveighoffer wrote:
>> Back to your idea...
>>  This feature that you suggest seems very trivial for the compiler to  
>> implement, while extremely hard to do it via reflection.
>
> The problem is, there are a million things that are trivial for the  
> compiler to implement and harder with libraries. But that approach just  
> doesn't scale. Finalize is only the beginning and pretty much a working  
> example to flesh out library primitives. Don't get bogged down by it.

Sure, there's a library solution.  But what I'm saying is, it coincides  
with a different problem, where both can be solved by adding some  
intuitive syntax.

Without adding the cruft of a dispatch function, D can provide an  
intuitive way to specify the layout of the vtable.  And that would make  
your problem easier to solve.  Not only that, the performance of simply  
copying the function in the vtable is impossible to achieve through a  
library solution.

-Steve



More information about the Digitalmars-d mailing list