Re: Derivates docs



"Andreas J. Guelzow" wrote:
Neil Booth wrote:
For example, Excel cluttering the namespace with the bond
functions like it does is not ideal, IMO.  If we create
any Gnumeric-specific functions for bonds, we should give
them a common prefix.


And I would rather go the other way: any Excel function we don't like
should be pre (or post) fixed while the `good' ones (whether from XL or
not)need no prefix.

Eye of the beholder, no?

I suggest namespaces can solve some of this.  Allow '::' as part of
names, so number theory functions look like NUMTHEORY::ISPRIME, and
Excel compatibility stuff is XL::PROPER or whatever, then an Excel
compatible spreadsheet mode (say when an XLS is imported) exports the
XL:: namespace into the global one so the functions are accessible as
plain PROPER.  There's no reason that the Excel functions can't be
split into different libraries XL-Base.so XL-Analysis.so so that
Andreas's request is met: the Excel functions that seem a good and
useful base can be made available and the dodgy financial stuff
can be omitted.  (That doesn't require a different prefix from XL::
necessarily). Also Andreas mentioned (I think) command completion
for functions which I think is also handled more easily with a
structural distinction of the library prefix.

C got by fine for the most part with simple prefixes for library
functions, but the process of unwinding that in C++ has been
pretty horrible: namespace std which doesn't have writev() in it,
preprocessor defines that run amok, etc.  Conclusion might be it's
better to make allowances for namespaces early.  Further, I can
think of no language where the addition of a simple namespace
facility was a net loss or inconvenience, and this one would be
pretty transparent.

The core question I can see is the syntax-space issue. '::' doesn't
mean anything now in Excel as far as I know.  What if Excel 2004
decided to use it for COM method invocation or .NET services or
some such?  Does that seem an important risk?

Anthony

Cc:d to jody gnome org as well, since my messages appear to fall
into a pit of twisty moderators. I've tried to join the list but
at my work address so I think this might bounce.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]