Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: way to create multiple connections with array #742

Open
joonas-yoon opened this issue Jan 30, 2023 · 2 comments
Open

proposal: way to create multiple connections with array #742

joonas-yoon opened this issue Jan 30, 2023 · 2 comments

Comments

@joonas-yoon
Copy link

I was trying to connect classes in a row as like:

Object -> Fruit -> Apple, Avocado, Banana, Grape, Melon

the output what I expected and what I've got is:

expected but actually
image image

but this is not what I want to do.

so I wrote the code like the following and its result is:

input output
Object -> Fruit -> Apple
Object -> Fruit -> Avocado
Object -> Fruit -> Banana
Object -> Fruit -> Grape
Object -> Fruit -> Melon
image

Do you have any plan to support some of array operations in connection?

I think this will be useful when user want to create N:N connections with same objects.

as is to be
Local -> Processor
Cloud -> Processor
Processor -> CPU
CPU -> 0
CPU -> 1
CPU -> 2
Processor -> GPU
GPU -> 0
GPU -> 1
GPU -> 2
[Local, Cloud] -> Processor -> [CPU, GPU] -> [0, 1, 2]
@alixander
Copy link
Collaborator

alixander commented Jan 30, 2023

oh i like this idea, especially that N:M aspect. i'm for it and thinks it fits well in the language design. The arrays would be explicit though, like

Object -> Fruit -> [Apple, Avocado, Banana, Grape, Melon]

instead of

Object -> Fruit -> Apple, Avocado, Banana, Grape, Melon

@nhooyr any thoughts?

(this is a beautiful issue report)

@nhooyr
Copy link
Contributor

nhooyr commented Jan 30, 2023

Seems reasonable to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants