Design idea: optional package
keyword and optional package name in package
#2323
Labels
design idea
An issue recording a specific language design idea that folks can potentially pick up.
long term
Issues expected to take over 90 days to resolve.
There are several provisional ideas which were added by @josh11b to the design overview. I'm filing this to track the ideas.
Key sections are:
https://github.com/carbon-language/carbon-lang/blob/trunk/docs/design/README.md#package-declaration
If the package name is omitted, as in
package library "Main" api;
, thefile contributes to the default package. No other package may import from
the default package.
If a file has no package declaration at all, it is the
api
file belongingto the default package and default library. This is particularly for tests
and smaller examples. No other library can import this library even from
within the default package. It can be split across multiple
impl
filesusing a
package impl;
package declaration.The text was updated successfully, but these errors were encountered: