LWN.net Logo

Advertisement

Front, Kernel, Security, Distributions, Development. See your byline here on LWN.net.

Advertise here

Versioned interfaces

Versioned interfaces

Posted Nov 21, 2007 16:29 UTC (Wed) by nix (subscriber, #2304)
In reply to: Versioned interfaces by davecb
Parent article: GCC unplugged

GCC uses versioned interfaces where appropriate (e.g. libgcc, libstdc++ and libjava), but
using versioned interfaces inside the compiler itself seems likely to be both fantastically
annoying and very slow. We're not talking coupling of the level of `struct stat' here; we're
talking passes that read and modify elaborate data structures which gain and lose properties
as they flow through different passes. How on earth would you propose versioning the tree
representing a C++ function? What if someone inserts a pass in the middle which accepts an
older version and transforms it? The later passes would expect the later version, but it's not
there anymore! (This is doubly true if the representation changes in major ways.)

No, this is much too much trouble. There are some things it makes sense to version. Parse
trees and intermediate language structures is not one of them.


(Log in to post comments)

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds