Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: What databases have taught me

Re: What databases have taught me

From: Marshall <marshall.spight_at_gmail.com>
Date: 30 Jun 2006 15:59:54 -0700
Message-ID: <1151708394.737690.313020@d56g2000cwd.googlegroups.com>


Dmitry A. Kazakov wrote:
> On 30 Jun 2006 12:49:36 -0700, Marshall wrote:
>
> > Dmitry A. Kazakov wrote:
>
> >> Types aren't sets of values.
> >
> > Would Russell agree, I wonder?
>
> Do you mean Russel-Whitehead type theory?

Yes.

> >> They are structures like: ring, field etc.
> >
> > Field is a type. Natural number is also a type, and + is not required
> > for that type, but it is certainly useful. So I have to disagree that
> > this is the only way to look at it.
>
> N is a type, but in a different meaning (it still has some operations
> defined). But this type is different from one of (N, +). (N, *) is yet
> another type. (N, +, *) is a fourth type. You've god the idea, I think.

Okay. So if I have a type N, with a minimal set of operators (just "successor")
and another module extends N with a + function, and a different module extends N with a * function, then we have three different types of N, is
that correct? Have we broken interoperability between N values coming from the three modules now? If not, in what sense are they different types?

> >>>> type <-> function is a relation. "Member" function is rubbish. BTW, when I
> >>>> talk about multiple dispatch I do include results of functions. So, say
> >>>>
> >>>> + : A x B -> C
> >>>>
> >>>> is triple dispatching. It is an operation of types A, B, C.
> >>>
> >>> Oh my goodness, that raises a whole host of problems! You
> >>> can't effectively dispatch on the right side of the arrow, because
> >>> that's the type of the result expression.
> >>>
> >>> For example, if you define both
> >>> +: int, int -> int
> >>> +: int, int -> float
> >>>
> >>> then what is the type of "1+1"? It could be either int or float.
> >>
> >> There are so many misconceptions in one single phrase, that I don't know
> >> where to start from.
> >>
> >> 1. Why parsing need to be bottom-up?
> >
> > "bottom-up" is not the question; the question is context-free vs.
> > context sensitive.
>
> You should mean a grammar here. It is a different issue.

*You* brought up parsing, not me. Or do you think that grammars and parsing are unrelated?! In any event, the issue you are raising is one of context sensitivity, which, while occasionally practiced in languages such as ADA and Perl, has been widely repudiated as a bad idea.

> You need not to
> resolve types during lexical analysis.

Lexical analysis is not parsing. I am talking about parsing.

Marshall Received on Fri Jun 30 2006 - 17:59:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US