Subject | RE: [Firebird-Architect] Namespace [was isc_add_user, et al] |
---|---|
Author | Samofatov, Nickolay |
Post date | 2004-02-26T16:53:31Z |
Hi, Jim!
conflicting names strongly depends on library load order, dl_open flags
and run-time access pattern (there is LD_LIBRARY_PRELOAD and other env.
vars on Linux where you can set library load order to get around some of
the issues). This is why Firebird-internal classes and functions should
be put to Firebird namespace to avoid collisions with other programs and
libraries (part of this work is done in FB2 HEAD codebase).
having two same C/C++ symbols on Win32 in different modules (and in all
other cases except ELF .SO) - I can show you an example (also, I work
closely with front-end writers; they can confirm there is no such
problem exists). In case of ELF .SO nothing can save you - your approach
doesn't work anyway. All symbols (including internal ones - this work is
now in progress) must be changed to get some safety on ELF. This
approach would create unnecessary work for front-end writers (you are
trying to care of them, right?) and even if we implement this, all
public API has to be changed at once, along with creation of wrapper
library for backward compatibility (and I'm not sure if this work really
needs to be done). Horrible mixture of isc_ and fb_ prefixes should
never exist.
We just got rid of gds_ prefixes for constants and made gds_ namespace
engine-internal. I don't want project to go through the same mess one
more time.
Anyway, since all the code is going to pass through Firebird team sieve
I have no problem to change your prefixes to currently correct "isc_"
ones. It is better for you to use "jim_" prefix so it will be easier to
find such code.
> >2. On ELF systems multiple FB/IB client libraries cannot coexistinside
> >one process. Period. Failure to obey this rule currently leads (andIt isn't. ELF entrypoint names are process-global. And resolution for
> >always lead) to random data corruption and strange behavior.
> >
> >
> Is this true of dynamically loaded libraries? I thought that a .so
> would resolve internal entrypoints a link time, so loading a number of
> libraries with overlapping internal resolved symbols is safe.
conflicting names strongly depends on library load order, dl_open flags
and run-time access pattern (there is LD_LIBRARY_PRELOAD and other env.
vars on Linux where you can set library load order to get around some of
the issues). This is why Firebird-internal classes and functions should
be put to Firebird namespace to avoid collisions with other programs and
libraries (part of this work is done in FB2 HEAD codebase).
> As an aside, let me grumble that the Unix community has neverunderstood
> layered software. The the current Firebink link, everything isglobal.
> "Grown up" operating systems use dynamic library systems whereexternal
> entrypoints are marked. Similarly, Unix systems have never learnedthat
> name space management is critically import. All programmers pick the"Grown
> same names for similar things, but those things vary in detail.
> up" languages like Java, C++, and Ada have all developed languagespecific
> specific mechanisms to handle the problem that civilized libraries and
> name space management could have solved (OK, often the language
> mechanisms are superior, but the point remains).and
>
> >As the result consistent usage of 'isc_' prefix for public constants
> >entrypoints is perfectly legitimate and should be followed.product
> >
> >Such stuff should not change each time the marketing name of the
> >changes.isn't
> >
> >
> >
> It is not legitimate for two organizations without a common conflict
> resolution process to share the same namespace. There is no possible
> compatibility if a program compiles and links but does something
> completely different. Or it becomes impossible to write a system that
> straddles the two systems. If Borland and Firebird could agree to
> resolve the management of name space and numeric codes, then I would
> agree with you and Jason. But this isn't an agreement now and it
> likely that one will be reached before Firebird 2 ships.with
>
> Isc stands for Interbase Software Corporation. Borland bought it,
> Borland owner it. It doesn't belong to Firebird. Borland/Interbase
> legitimately owns the prefix "isc". Yes, they released Interbase from
> bondage, but they still own the prefix and continue to maintain and
> extend the product. While there is probably no legal obstacle to
> masquerading Firebird features as "Interbase Software Corporation", it
> is intellectually indefensible to label services they don't support
> their name and to clog up their namespace with our own conflictingshould,
> symbols.
>
> Qualified names exist to avoid name conflict. Using qualified name to
> promote name conflicts is unfair and technically wrong.
>
> Nobody was happy when Mozilla appropriated the name Firebird for their
> product. Borland Interbase has the same right to complain about
> Firebird usurping their name space.
>
> Interbase has always used qualified symbols to differentiate its
> entrypoints and codes to allow it to coexist with other systems,
> including other systems that don't play by the rules. Firebird
> must, continue this practice. And that means that symbols and codethat
> are not defined by Interbase Software Corporation cannot be prefixedJim, you insist on wrong provision. There is no technical problem on
> with "isc."
having two same C/C++ symbols on Win32 in different modules (and in all
other cases except ELF .SO) - I can show you an example (also, I work
closely with front-end writers; they can confirm there is no such
problem exists). In case of ELF .SO nothing can save you - your approach
doesn't work anyway. All symbols (including internal ones - this work is
now in progress) must be changed to get some safety on ELF. This
approach would create unnecessary work for front-end writers (you are
trying to care of them, right?) and even if we implement this, all
public API has to be changed at once, along with creation of wrapper
library for backward compatibility (and I'm not sure if this work really
needs to be done). Horrible mixture of isc_ and fb_ prefixes should
never exist.
We just got rid of gds_ prefixes for constants and made gds_ namespace
engine-internal. I don't want project to go through the same mess one
more time.
Anyway, since all the code is going to pass through Firebird team sieve
I have no problem to change your prefixes to currently correct "isc_"
ones. It is better for you to use "jim_" prefix so it will be easier to
find such code.
> Jim StarkeyNickolay Samofatov