so .roc files can have different purposes, and the keyword at the start of the file determines what it does (currently either app, platform, hosted, or interface; in the future, package will join that list)
of these, only interface and hosted can be listed in imports
I think the semantics of these are correct and shouldn't change, but I'm not thrilled with the names
for example, interface is what most languages would call module
I wanted to try out the name "interface" instead of the obvious choice of "module" because:
.roc file all feel kinda like modules to me, so I wanted to give "the ones you can import" their own name - as opposed to (for example) saying "there are app modules, platform modules, and...normal modules" - but maybe a better design is to call the others something else other than modules?so my questions are:
interface modules?platform things, the app things, the package things, etc.) Are they all "modules"? "Files"? Something else?I think these 2 questions are coupled in the sense that "module" is the most obvious answer to both of them, but if it's chosen as the answer to both, then referring to "a module" becomes ambiguous
If you want any general ideas for discussion without much reasoning behind them besides my feelings, here's a few:
Interface could be: surface, external, or exterior.
The "things" could be: components, elements, or environments.
Although module does feel/sound the most natural to me, but that might just be because it's familiar to me as a generic collection of code or a file.
One thing that is problematic is that modules are units of code, in couple of languages you can have more modules in one file.
Also sometimes modules are treated as multifile units, esp. when you consider sub-modules as a thing.
I have spent some time playing with different visualizations of modules, I used boxes, pills and organic cells as best metaphors for it.
But my suggestion is that we omit keyword for modules that don't have a special role, which hopefully should be biggest number of .roc files. Here is quick motto. "If is not special or it is hosted it can be imported!"
Last updated: Jun 16 2026 at 16:19 UTC