Re: What databases have taught me

From: erk <>
Date: 29 Jun 2006 10:19:37 -0700
Message-ID: <>

Marshall wrote:
> No disagreement here. However my personal feeling is that most
> or all of the functional idioms, and also the Python idioms, including
> list comprehensions (which was borrowed from Haskell if I'm not
> mistaken) actually have better counterparts in the relational algebra.
> I say this not intending to disparage either FP or Python.

I think in this respect "better" is difficult to establish, but certainly they're counterparts in one major revolutionary leap over much previous programming and data management practice: set-oriented expressions and applications, rather than record- or datum-at-a-time.

Certainly relational offers more powerful and flexible structures on which operators (or "operator generators") can be defined, and so perhaps I'm being short-sighted here, but I regard functional parameters and functional combinators as necessary precursors.

> Well, I suppose it depends on what you mean by semantic correctness.
> Certainly structural typing introduces the possiblility of "accidental"
> type compatibility, but I consider this a minor problem. (I never
> hear SML programmers complain about it, for example.)

This enables a class of more powerful and generic functions, while nominal typing enables enforcement, but limits flexibility. I wonder whether a language that supports both kinds of typing would be useful, or a disastrous mess.

> A fair point. I remain sceptical about multimethods in particular, but
> I agree in general. (I wonder: if a language lacks subtyping, and
> has overloading, is there anything left for multimethods to do? Hmmm.)

I think multimethods are essential for system extensibility, and essential to proper polymorphic behavior (which is about the only useful, albeit usually poorly-implemented, feature of O-O). Predicate-based dispatch (aka pattern matching?) is, to me, the logical extension of the concept.

  • erk
Received on Thu Jun 29 2006 - 19:19:37 CEST

Original text of this message