Re: [sv-bc] Package export proposal (2 alternatives)

From: Greg Jaxon <Greg.Jaxon_at_.....>
Date: Mon Sep 25 2006 - 11:39:34 PDT
There is a third alternative: having export implicitly import.
This leaves no hard-to-explain error states.
LRM already says it won't hurt to import the same thing twice,
so it will be OK to import P::* and then selectively export P::id.

Greg

Gordon Vreugdenhil wrote:
> I've uploaded 2 variants of the package export proposal to Mantis
>    http://www.verilog.org/svdb/bug_view_page.php?bug_id=0001323
> 
> The proposals incorporate Brad's formatting and removal of the
> unnumbered paragraph headings.
> 
> The 2 alternatives differ in how named exports are handled.
> In particular, if you have:
>    export p1::x;
> Does the declaration of "x" in "p1" need to be visible via
> an import of "p1" or is it acceptable to have the export
> be legal as long as "p1::x" is visible via some export from
> another package that is imported?
> 
> The "alt1" proposal has the sentence:
>    The declaration being exported must be imported from the same
>    package_name used in the export.
> 
> The "alt2" proposal has the sentence:
>    The declaration is not required to be imported from the package_name
>    of the export as long as some import has made the declaration available.
> 
> The examples in "alt1" have been modified to reflect the tighter
> rule; the "alt2" proposal keeps the examples in the form of the
> earlier proposal.
> 
> 
> I am fine with either approach.  "alt2" is a bit more subtle in
> terms of how names flow and when an import is required.  "alt1"
> would be a bit more pedantic in some cases but makes the
> symmetry between import and export more explicit.
> 
> Gord.
Received on Mon Sep 25 11:39:44 2006

This archive was generated by hypermail 2.1.8 : Mon Sep 25 2006 - 11:40:02 PDT