Re: What databases have taught me

From: Marshall <marshall.spight_at_gmail.com>
Date: 30 Jun 2006 15:19:37 -0700
Message-ID: <1151705977.721110.38490_at_i40g2000cwc.googlegroups.com>


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 Sat Jul 01 2006 - 00:19:37 CEST

Original text of this message