Re: What databases have taught me
From: Bruno Desthuilliers <onurb_at_xiludom.gro>
Date: Thu, 29 Jun 2006 20:49:28 +0200
Message-ID: <44a420b9$0$2107$636a55ce_at_news.free.fr>
>
>
> 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.
>
>
>
>
> 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.
>
>
> 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).
Date: Thu, 29 Jun 2006 20:49:28 +0200
Message-ID: <44a420b9$0$2107$636a55ce_at_news.free.fr>
erk wrote:
> 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.
Then just try some of them !-)
>
>>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).
Don't know for sure if it's the "only useful" feature of OO, but that's definitively something that really helps IME. And when one reads the description (and implementation details, my my my) of the "visitor pattern", the fact that there's a problem with how polymorphism works in most OOPLs is quite obvious indeed !-)
> Predicate-based dispatch (aka pattern matching?)
> is, to me, the logical
> extension of the concept.
[1] I've mostly seen this in OCaml, and IIRC in Haskell, but never did more than toying with both languages.
-- bruno desthuilliers python -c "print '_at_'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in 'onurb_at_xiludom.gro'.split('@')])"Received on Thu Jun 29 2006 - 20:49:28 CEST