Re: Declarative constraints in practical terms

From: dawn <>
Date: 5 Mar 2006 14:04:27 -0800
Message-ID: <>

Marshall Spight wrote:
> dawn wrote:
> > Marshall Spight wrote:
> > > >
> > > > What do you want in your language that you cannot get with Java?
> > >
> > > Did you read the PDF yet? :-)
> >
> > Most of it, scanned the rest. It looks like they made the
> > design-by-contract thing work with Java by adjusting the compiler, but
> > I see that a language could be designed that way from the start.
> You've got it!
> The idea is something like an integrated constraint language,
> that would provide coverage for what DBC provides, as well
> as what CHECK constraints in SQL provide.
> > > One thing to consider, though, is that client code doesn't necessarily
> > > stay in lock-sync with server code, and we have to be able to
> > > deal with that. If you're in the field and can just barely make a
> > > dialin link with your laptop, you don't want to have to download
> > > the newest 30 MB release of the email client; you just want to
> > > get you latests messages. You can get the new client when you
> > > get back to the office.
> >
> > OK, but it could still be sourced with the rest of the system, even if
> > the client only accepts a new copy when it wants to.
> Yes, this would be desirable.
> > > > Is it possible to have a language that implements the RM (including the
> > > > Information Principle) and is a general purpose programming language?
> > >
> > > Sure. Take a simple relational language, with only relations, ints,
> > > strings, and set operations: union, intersection, projection, join.
> > > Add recursive functions. There you are! You have first class
> > > relational operations, and you also have a language that can
> > > compute any computable function.
> >
> > Hmmm. I wish I understood that better.
> If you are interested in programming language design, allow me
> to recommend "Concepts, Techniques, and Models of Computer
> Programming" by Van Roy and Haridi. Really an amazing book.
> It takes the approach of viewing language design at its building
> blocks, and considers a wide variety of choices for these
> building blocks.

When I tried to add it to my amazon wish list, I was told it was already there (on what is unfortunately a huge list).

> > > I think you and I have different ideas about the spirit of the
> > > Information Principle.
> > >
> > > Me: "*all information* is represented by *data values* in relations."
> > > You: "all information is represented by data values in *relations*."
> >
> > That is enlightening. You are right, that is how I hear it. Remove
> > the requirement for all information to be represented by data values in
> > relations and it doesn't quite seem like relational theory to me. If
> > that is not a requirement, then I might have no beef with the RM.
> I like the RM, but it's not a complete solution. It's not turing
> complete.
> So if you want to have a general purpose language, you've *got*
> to add something more.
> > > Being conscious of the idea that all information
> > > should be available in a uniform way, I'm constantly
> > > pained by the fact that it's not. :-)
> >
> > I sorta hate to say it, but the web and XML seem like the best shot to
> > get that uniformity, don't you think?
> Ah, that.
> Those certainly have the most momentum in this direction. But
> I can't say I find the XML family of file formats and languages
> at all compelling.

As a format, it has some advantages over comma-quote, for example, but having the metadata intertwined with the data has advantages and disadvantages (performance, for example). Other than XQuery, I'm not sure what you consider to be a "language" associated with XML.

> I know good design when I see it; that's
> not it. :-(

It does seem a shame that we can either start with the web or with the RM, but given that choice I'll start with the web. It has given us increased possibilities.

> As I've said before, you need a type system and schema
> support from the start.

I'm good with Java, but I'm still (too) open on typing. I really like the MV approach that allows you to describe data however you see fit, multiple times in multiple ways.

> You can't retrofit them later.
> XMLSchema notwithstanding. OTOH XML is certainly an
> instance of a programmable data format, and that's an
> excellent thing.

High praise. Cheers! --dawn Received on Sun Mar 05 2006 - 23:04:27 CET

Original text of this message