Language Design: Adding internal to package keyword may be feasible

The internal keyword could be used with the package keyword in order to turn all definitions in a file into package-internal by default.

This will be equivalent to applying internal as visibility (instead of public) to any declaration that has not been explicitly defined with another visibility keyword.

internal package math

// everthing is declared as internal

Similarly, private may be treated in the same manner.

2 Likes