Stream: ideas

Topic: New platform header


view this post on Zulip Anton (Jul 04 2023 at 10:44):

In response to this topic.

Instead of:

platform package [Stdout, Stdin]
    requires [main]
    provides [mainForHost] to "prebuilt-hosts/"
    packages [
        Foo, Bar, Baz from "https://…",
        Something as Smt from "https://…",
    ]

I would prefer:

platform-package
    exposes [Stdout, Stdin]
    requires [main]
    provides [mainForHost] to "prebuilt-hosts/"
    imports [
        Foo, Bar, Baz from "https://…",
        Something as Smt from "https://…",
    ]

view this post on Zulip Richard Feldman (Jul 04 2023 at 11:03):

interesting! I don't have strong feelings either way about the dash in the initial keyword, but I'm interested in imports over packages.

on the one hand, I don't love package ... packages ... so imports feels nicer.

on the other hand, could that get confusing with the import keyword? I can imagine trying to have a conversation and someone says "imports" and you're not sure if they mean imports or "multiple import declarations" :sweat_smile:

view this post on Zulip Richard Feldman (Jul 04 2023 at 11:03):

also a thing I like about packages is that it self-answers the question about whether you can import modules with it

view this post on Zulip Anton (Jul 04 2023 at 12:07):

on the other hand, could that get confusing with the import keyword? I can imagine trying to have a conversation and someone says "imports" and you're not sure if they mean imports or "multiple import declarations" :sweat_smile:

That is possible but it also seems like confusion here would not have grave consequences :p

view this post on Zulip Anton (Jul 04 2023 at 12:08):

packages does not seem self-evident to me, I would doubt if it's exposing packages, wrapping packages or importing them.

view this post on Zulip Ajai Nelson (Jul 04 2023 at 16:27):

Yeah, I think the word packages is confusing because it's unclear that it's intended to be a noun, not a verb. Especially since the other keywords above it are all meant to be verbs. I guess imports packages would make it clear, but maybe it's too much to require two words there.

view this post on Zulip Hannes (Jul 05 2023 at 02:55):

I spotted this conversation after I left a comment in another thread, so I'll paste it here

Hannes said:

I was going to say something similar to this, when I read the word packages I read it as a verb, like "this app packages these things" instead of the noun like "these are the packages to import". Maybe that's because I was used to the current Roc syntax and expected it to read like a sentence, I could probably just get used to a noun like in most languages manifest files.

view this post on Zulip Brian Carroll (Jul 05 2023 at 06:23):

How about using depends or depends-on as the keyword?


Last updated: Jun 16 2026 at 16:19 UTC