Jonathan S. Shapiro wrote:
> The language definition currently has a provision for a DECLARE form
> inside a procedure body. We need to find a better name for that, and it
> has nothing to do with this note at all.
>
> Something *like* this will be added to the language spec when I can get
> a decent link. Please note that I have NOT checked the following for
> possible parse ambiguities, and it may need to change to resolve these.
>
>
> SUMMARY: we need a DECLARE form.
>
> We need a mechanism to accomplish the following:
>
> 1. Forward declaration of types so that circular use of reference types
> is possible.
>
> 2. Type declarations of variables defined elsewhere, e.g. in assembly
> language. **This usage is unsafe.**
>
> ...
> In contrast to forward type declaration, this usage of DECLARE does
> *not* expect a definition to follow within the same module -- indeed, a
> following definition of this form would be an error!
>
> It may be better to use different syntax for this purpose, such as
> perhaps
>
>   (extern id : type)
>


Given that all of the types declared by the DECLARE forward declaration
have to occur within the same compilation unit, is it the case that it is
very inconvenient to write them inside a 'rectypes' form rather than
having a forward declaration? And, if so, do we need both of these forms?

I understand that we do need the "extern" declaration.

Swaroop.


_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to