[Types-sig] RFC Comments

Paul Prescod paul@prescod.net
Wed, 29 Dec 1999 17:19:51 -0500

skaller wrote:
> ...
>         It _is_ possible to import only the interface
> of a module, and this should be done when 'import X' is
> seen. In pass two, a full two pass importation is triggered,
> but the interface loading is skipped because the interface
> is already loaded. However, the import still requires TWO
> passes DURING PASS 2, because the implementation file
> may also include inline declarations. 

Do you mean old fashioned Python function and class declarations or
newfangled decls and typedecls?

> It follows FROM THE MODEL
> that these declarations are effectively private.

It was never my intent that decls and typedecls could be private.

> ...
>         Summmary: pass 1 processing only permits
> pass 1 processing to occur recursively, whereas
> pass 2 imports may invoke  a full two phase translation.

My plan was: do everything relating to types, in ALL modules and then do
everything relating to code generation in all modules.

>         So because the semantics of importing a module
> (two passes) are quite distinct from only importing
> interfaces, and even that has two possible variants,
> it seems useful, if not essential, to permit a
> pass 1 only kind of importation -- 'include'.

Still not sold on "include".

> but my taste is only a minor point here, I'll run with 'as'
> if that is the final choice. 

We'll do a poll once other details are worked out.

> But your use of a function
> call like:
>         interface_check(x,i)
> for a run time test is not as simple as reusing "!"
> for the same purpose:

I am mildly uncomfortable with new expression syntax but my arguments
against it are not watertight so I will document the inline "as" unless
someone else feels as I do. To be honest, I would prefer colons in
function defs and "as" in other contexts if it came down to it. If
terseness is important enough to sacrifice readability for, I would
rather sacrifice it in favor of a mild inconsistency instead of a whole
new meaning for a punctuation character.

 Paul Prescod