Re: Declarative constraints in practical terms

From: Marshall Spight <marshall.spight_at_gmail.com>
Date: 3 Mar 2006 21:10:42 -0800
Message-ID: <1141449042.104149.112590_at_t39g2000cwt.googlegroups.com>


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.

> > 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. I know good design when I see it; that's not it. :-(

As I've said before, you need a type system and schema support from the start. 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.

Marshall Received on Sat Mar 04 2006 - 06:10:42 CET

Original text of this message