Pyd: Wrapping too many functions in a class gives a compilererror

Steve Teale steve.teale at britseyeview.com
Fri Jul 13 10:05:14 PDT 2007


Pragma Wrote:

> BCS wrote:
> > Reply to Pragma,
> > 
> >> The problem is that the overly long template symbols are needed to
> >> allow the linker to do it's job: expunge redundant symbol definitions
> >> while locating the correct match for a dependency.  As the properties
> >> of a template instance is defined by its arguments, you really can't
> >> separate the two.  Combined, you get both run-time and link-time
> >> behaviors that depend heavily on the naming spec staying right where
> >> it is.  Change the spec, and you allow for false matches that can
> >> really screw things up.
> > 
> > What is the chance of a hash coalition if all (and only) over length 
> > symbols are named by a hash code that is as long as /will/ fit?
> > 
> > Alternately (and this will only work with single run compilation or with 
> > external meta data) name everything with GUIDs.
> > 
> > Unless I am mistaken, really the only thing that is needed is that some 
> > unique name is assigned to each instance in a way that will let other 
> > stuff find the same name from the same input.
> >
> 
> Yep, that's the gist of it.
> 
> The problem you run into with hash codes (and GUIDs generated from a given source) is that they're not unique, so 
> collisions are possible, even if they're incredibly unlikely; linking against a library could theoretically fail 
> *without any recourse* if you have such a collision.  Also, they need to be reversible, such that a given hash will 
> resolve to exactly one D signature.
> 
> -- 
> - EricAnderton at yahoo

Off topic, but I emailed you about DDL, DSP etc - did you get it?




More information about the Digitalmars-d mailing list