
What do you mean here?

In, say, Python, import json
gives you json
(which is an object, so you can refer to things in json
by json.blah
) rather than all symbols in json
.

Haskell has the same thing

For Rhombus, it might look like:
require racket/string
string.split "a,b,c" ","

Though string
can’t be an object like Python, because it wouldn’t make sense to invoke a macro in a runtime object

Though… this doesn’t really solve the problem I originally posted, does it? Cause other people might write:
require racket/string
require mylib/string
and we now have conflicting string.split

One possible solution is that by default, you can’t import the two collections ending with .../string
.
However, you can:
require racket/string as string
require mylib/string as string
and now you are on your own for any conflict.

So that’s what the . meant :)

My opinion is that we should not allow any shadowing with requires. Any conflict must be resolved manually. However, when a conflict is discovered, the error should mention when the identifier was introduced in both libraires—at least for well designed libraries—so as to help the user resolve it easily. In particular it’s likely that the conflict must be resolved in favor of the library that introduced it first, especially if the timestamps largely differ. Timestamps could be correctly synced at least for packages of the same catalog.

@shu—hung has joined the channel