comp.lang.ada
 help / color / mirror / Atom feed
From: Eric Hughes <eric.eh9@gmail.com>
Subject: Re: Partial type specifications and their ordering
Date: Tue, 18 Mar 2008 07:30:19 -0700 (PDT)
Date: 2008-03-18T07:30:19-07:00	[thread overview]
Message-ID: <a93d5994-c311-46e0-b9f3-330b625ce4c8@s12g2000prg.googlegroups.com> (raw)
In-Reply-To: 4yntq9j6q827.kusbb0olb916.dlg@40tude.net

On Mar 18, 2:40 am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:
> Your draft does not explain why certain sets of types (called partial here)
> cannot form a proper class.

No code.  No subprogram definitions.  Nothing to execute.  The name
"partial type" can be taken as an abbreviation for "partial
specification of a type".  Pretty much every definition of types that
I've seen, starting with Godel's 1957 _Dialectica_ paper, uses some
kind of algorithm expression to define types.  A partial type strips
out algorithm expressions and focuses only on assumptions and results
of operations and on invariants about data.

> My guess is that any set of types can be associated with a class.

Any set of partial types can be associated with a least common
superclass.  That's what a lattice is.  See http://en.wikipedia.org/wiki/Lattice_%28order%29.

> Consequently, generic types (not Ada term, but the meaning is obvious) are
> fully equivalent to classes.

Please go find out what Alonzo Church meant by a lambda constructor
(which became Lisp, but is far broader than Lisp).  Barring
degeneracies, a generic type has a higher minimal lambda recursion
level than an ordinary type.  If you'd rather use a programming
language that treats type recursion as basic, try a functional
language such as Haskell.

Partial types specification are a notion orthogonal to generics.

Eric



      reply	other threads:[~2008-03-18 14:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-17 23:14 Partial type specifications and their ordering Eric Hughes
2008-03-17 23:20 ` Eric Hughes
2008-03-18  8:40 ` Dmitry A. Kazakov
2008-03-18 14:30   ` Eric Hughes [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox