Ticket #116 (closed defect: deferred)

Opened 2 years ago

Last modified 8 months ago

(Resolved) Packages should not be required to be first in a compilation unit

Reported by: jeffdyer Assigned to: jeffdyer
Type: defect Priority: trivial
Milestone: M2 Component: Spec
Version: 4 Keywords:
Cc: lth

Description (last modified by jeffdyer) (diff)

Packages are just namespaces, there is no reason to require them to come first in the program.

Here is a simple use case:

use namespace intrinsic
package p
{
   // define stuff in p that might want to use stuff in the
   // intrinsic namespace
}

Attachments

Change History

Changed 2 years ago by jeffdyer

  • cc set to lth
  • description changed from Packages are just namespaces, there is no reason to require them to come first in the program. {{{ use namespace intrinsic package p { // define stuff in p that might want to use stuff in the // intrinsic namespace } }}} to Packages are just namespaces, there is no reason to require them to come first in the program. Here is a simple use case: {{{ use namespace intrinsic package p { // define stuff in p that might want to use stuff in the // intrinsic namespace } }}}

Changed 1 year ago by lth

  • component changed from Proposals to Spec

There has been agreement about this in the past.

Changed 1 year ago by graydon

I have actually lifted this restriction in my type-closures branch. Packages, like units, and anonymous sequences of directives, are reorganized to be syntactically a form of fragment. Fragments can come in any order.

Changed 1 year ago by lth

  • priority changed from major to trivial
  • summary changed from Packages should not be required to be first in a compilation unit to (Resolved) Packages should not be required to be first in a compilation unit

Changed 8 months ago by graydon

  • status changed from new to closed
  • resolution set to deferred

packages (and thus import) have been removed from the feature-set of ES4

Note: See TracTickets for help on using tickets.