• Eric Myhre's avatar
    Fix many issues with maybes; adjunct config for if maybe is implemented using... · 125a2a7f
    Eric Myhre authored
    Fix many issues with maybes; adjunct config for if maybe is implemented using a pointer; attempt the finishCallback system for reusable child assemblers.
    
    This... almost appears to be on a dang nice track.
    
    Except one fairly critical thing.  It doesn't work correctly if your
    maybe IS implemented as containing a pointer.
    
    Because that pointer starts life as nil in the parent structure.
    
    And that's hard to fix.
    
    We can't have a pointer to a pointer in the assembler;
    that'd cause the type bifructation we've been trying to avoid.
    (We can give up and do that of course; it would be correct.
    Just... more code and larger final assembly size.
    And if we did this, a lot of this diff would be rewritten.)
    
    We could have the parent structure allocate a blank of the field,
    and put a pointer to it in the maybe and also in the child assembler.
    Except... this is a wasted allocation if it turns out to be null.
    
    Rock and hard place detected in a paired configuration.
    Might have to back out of this approach entirely.  Not sure.
    125a2a7f
stringGenMixin.go 4.73 KB