Ben Tilly wrote:

# Dave Thomas <Dave / PragmaticProgrammer.com> wrote:
# >
# >"Christoph Rippel" <crippel / primenet.com> writes:
# >
# > > try to express this in Ruby - it is going to be a nightmare.
# 
# (This having been a basic ring construction.)
# 
# >Perhaps you could help me understand the problem. The Ruby solution
# >would seem to my naive eyes about half the size an considerably
# >clearer. Without the need to jump through template hoops for type
# >safety, most of the issues of genericity seem to go away.
# >
# >What am I missing?
# 
# Constructing Z/n is a special case of a generic
# construction that you see in ring theory.  The general
# idea is that you take a ring R (eg Z), and a subring I
# (eg the multiples of 5) with the special property that
# anything in R times anything in I gives you something
# back in I.  You can now say that two elements x and y
# are the same mod I if x-y is in I.  Each equivalence
# class can now be represented by a single element in R,
# and the set of equivalence classes turn out to be a new
# ring R/I.
# 
# In my books a good model of Ring would be able to handle
# this common and basic construction.  That would mean
# (for instance) being able to handle the idea that
# evaluating x=5 can be done in Q[x] (the ring of
# polynomials over the rationals) by modding out by the
# ideal (x-5).  (Ruby might do this, I don't know.  But
# to my eyes this is a statement of the general problem
# that I see in modelling concepts like Ring in an OO
# hierarchy.)

Well, I've long ago forgotten the precise formal definition of ring
(although I still have some inkling of what they are), but I think
that it's safe to say that for most people trying to understand the
genericity issue, it will be as if your reply to Dave's question was
designed to be maximally inscrutable. 

How about making another try in the field of much more widely known
objects? (Sorry, couldn't resist the field and OO puns, even though I
know they weren't very rational ideals (dang, just did it twice
again).)  :-)

Conrad Schneiker
(This note is unofficial and subject to improvement without notice.)