Channel declarations in config funtions should return a struct in DSLX
Open
dslx
enhancement
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
Right now in the `config` of a proc chan declarations produce a two-tuple of in and out channels which can be used when spawing other procs. Exmaple:
```
pub proc foo {
in_ch: chan in;
...
config (a: chan in) {
let (x_in, x_out) = chan;
spawn bar(x_in);
spawn qux(x_out);
(a, )
}
next (...) { }
}
```
A cleaner syntax might be for `chan` to return a struct containing the in and out channels. So you'd have:
```
pub proc foo {
in_ch: chan in;
...
config (a: chan in) {
let x = chan;
spawn bar(x.in);
spawn qux(x.out);
(a, )
}
next (...) { }
}
```
Contributor guide
Assessment
This issue has not been assessed yet.