Re: Storing data and code in a Db with LISP-like interface

From: Dmitry A. Kazakov <mailbox_at_dmitry-kazakov.de>
Date: Tue, 2 May 2006 22:37:20 +0200
Message-ID: <1eoppyf1hkii3.1e57b9wnn6qqy.dlg_at_40tude.net>


On Tue, 02 May 2006 17:58:44 GMT, Bob Badour wrote:

> With all due respect, the type 'set' defines values and operations.
> Without the operations, the 'set' is pretty much useless.

Any ADT defines values (the domain set) and the operations defined on. ADT "Set" does it as well.

> Container libraries are for shit. Give me mathematics over some crappy
> physical implementation.

What kind of mathematics you need?

  1. Problem space? Program objects are not mathematical ones. They could be models of. That is the case for a container type modeling sets. But in general they are not, which has nothing to do with RM vs. OO controversy.
  2. Program semantics? Correctness is a separate issue. Refer to DbC and formal static analysis. It is a quite decent mathematical discipline.
  3. Types theory? Lambda calculi? There is no agreement on it, so far. But it definitely lets formalization.
>> 4. Classes
>> 
>> A class is a closure of a set of types. Isn't it about sets?

>
> So then, one should be able to define the set operations easily. Right?
> A join creates an entirely new type that is not a subtype of either of
> the things joined. A union creates something that strictly speaking
> defines a superset of the values of the types joined, which would mean
> it could define a supertype of the things joined but not a subtype of
> either. Cartesian product creates a new type that is neither a supertype
> nor a subtype of either of its operands.
>
> Your replies in 3 to support your assertion that set operations are
> supported actually contradicts the assertion.
>
> A supertype is a superset of values

This is a common misconception. The domain set of a supertype is not a subset of the domain set of its subtype. There is only a mapping between these two sets. It should be injective for in-operations, surjective for out-operations.

> and a subset of operations.

Not quite. To be a suprtype means to export operations to the subtype. If all operations are exported, then they from a proper subset.

> However,
> this observation hardly leverages the power of set algebra and the
> equivalent predicate logic. Now does it?

It does not model set theory. Why should it? If you want a mathematical equivalent then category theory is closer.

> Think about tables of tables and operations

>> defined on them. That would be an RM equivalent of generic programming.

>
> Yes, it would. However, you have failed to establish that OO is an
> application of set theory. At best, you have suggested one can use sets
> to describe the ad hoc shit the OO disciples promote.

Which is exactly an application of. You know, set theory was invented solely to describe the shit around as...

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
Received on Tue May 02 2006 - 22:37:20 CEST

Original text of this message