[Types-sig] decls and typedefs (was: RFC Comments)
Greg Stein
gstein@lyra.org
Thu, 30 Dec 1999 10:54:45 -0800 (PST)
On Wed, 29 Dec 1999, Paul Prescod wrote:
> skaller wrote:
...
> > It follows FROM THE MODEL
> > that these declarations are effectively private.
I don't see how that follows. But the comment was in regards to the
distinction between an import/include process. I believe that distinction
is bunk (as I explained in the other note), so the notion of "follows" is
probably moot.
> It was never my intent that decls and typedecls could be private.
A "decl" does not establish a name in my mind. It defines the type that a
name *will* use, but nothing more. So far, we have decls to specify
interface attributes. I think there is something in there for declaring
parameterized types, but I'm still not clear on that syntax. In any case,
they only declare type information -- you still need an assignment
somewhere to establish a value.
To associate information with a name, I think that we want to use an
assignment or the classdef/funcdef pattern (... name: suite). This is
where the "typedef" operator came from, allowing you to do:
IntOrString = typedef Int or String
Have no fears -- the type checker can easily understand the above code.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/