Re: The Practical Benefits of the Relational Model

From: Costin Cozianu <c_cozianu_at_hotmail.com>
Date: Wed, 09 Oct 2002 19:00:47 -0700
Message-ID: <ao2mmq$ilqef$1_at_ID-152540.news.dfncis.de>


Nathan,

Can you elaborate on the field example, please ? Maybe it's something that I'm missing, but I can't figure out what's in those dots.

That problem involved only simple abstract types that are defined by their operators, not by their possible representation. So it seems to me that operators have to be part of the type declarations, but who knows maybe Im'm wrong.

And speaking of higher order types, a relation type *is* a higher order type. Array, lists and so on, if you provide them. So you are beyond first order logic volens nolens.

Can a user declare a generic type in D ? Let's say a directed graph.

I'd also be grateful if you can show me an example of how you declare a function that does topological sorting, taking as input 2 parameters:

  • a set of elements of a generic type E (we don't want to repeat the algorithm for every little case, do we)
  • a function f:ExE->Bool that induces the order f(a,b)=true *iff* a < b in the directed graph over the set of E. and as output it returns a List of elements of E (which is the input set sorted in topologicla order if it exists).

I don't need any implementation, just the declarations (all of them), so it shouldn't be too difficult an exercise.

This way, we can avoid abstract misunderstandings in our discussion. If you show me how to do it in D, I'll be more than convinced of the justness of your arguments.

Best regards,
Costin Cozianu

Costin Cozianu Received on Thu Oct 10 2002 - 04:00:47 CEST

Original text of this message