Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> comp.databases.theory -> Re: What databases have taught me
Keith H Duggar wrote:
> Marshall wrote:
> > Dmitry A. Kazakov wrote:
> > > Types aren't sets of values.
> >
> > Would Russell agree, I wonder?
>
> Exactly.
>
> > > They are structures like: ring, field etc.
> >
> > Field is a type.
>
> Why are you agreeing to this? A field is an algebra not a
> type.
I am thinking in Stepanov terms. Here's his C++ code for gcd:
template <class EuclideanRingElement>
EuclideanRingElement gcd(EuclideanRingElement m,
EuclideanRingElement m) {
while (n != 0) {
EuclideanRingElement t = m % n;
m = n;
n = t;
}
return m;
}
Here, he defines a ring type, and defines gcd in terms of
ring operators. The above code will work for any kind of Euclidean
ring;
it requires only some % function, and a 0 element. It will work on
integers, polynomials, fields, etc.
See
http://www.stepanovpapers.com/
and particularly
http://www.stepanovpapers.com/gcd.pdf
> Dimitry seems to be using a rather odd non-standard
> terminology.
No disagreement there.
Marshall Received on Fri Jun 30 2006 - 17:19:37 CDT