Subject RE: [Firebird-Architect] Re: Design of new built-in functions
Author Leyne, Sean
Jim,

> Frankly, I don't think there should be any difference between system
and
> user defined functions other than system functions show up
automatically
> on Firebird installation or update. A function is a function.

I don't believe you said that!!!...

While a function is a function, the implementation can be VASTLY
different.

Leaving aside the possibility of a different number of
arguments/parameters and their datatypes, the logic/implementation can
be completely different!

Consider a function like ROUND() -- the System function might use a
'traditional' rules -- if the remainder is greater than .5, then
increment the result. My function might use/follow 'bankers' rule -- if
the remainder is greater than .5 and the initial value ends with an odd
value, then increment the result.

If the result of ROUND() is based on the setup/configuration of the
engine or the database, you are setting all sysdba's and developers for
a support nightmare.

Consider what it would be like to deal with issues on the Firebird
support list!!

Yes, it is possible to design/implement the approach you propose?
Absolutely.

Is it possible to use/develop a low maintenance software solution based
on that approach, which will produce predictable/consistent results
without having to worry about all the configurations possibilities, I
seriously doubt it.

If a user can mess with the configuration of the software I have
installed such that the results will not match 100% with my expected
results -- then the system/engine is of no value to me.

This is not an exercise in "how many fairies can I fit on the top of a
pin", this is about delivering an engine which solves business problems.
In a supportable manner.


Sean