nevalang / neva

🌊 Dataflow programming language with static types and implicit parallelism. Compiles to machine code and Go
https://nevalang.org
MIT License
128 stars 8 forks source link

`...` (streaming operator) #732

Open emil14 opened 1 month ago

emil14 commented 1 month ago

Before

getList -> listToStream -> forEach
getDict -> dictToStream -> forEach

After

getList... -> forEach
getMap -> forEach

Props: this way we don't have to memorize naming for these convertors

Cons: doesn't cover case with arr-ports

emil14 commented 1 month ago

another way is

getList -> ... -> forEach

this might be better because of the same problems with struct selectors (also existing struct selectors could be sender/receiver kinds/expressions themselves)

emil14 commented 2 weeks ago

XXX... allows more obvious usage in for statements

''' for xxx... {

} '''

OTOH 'xxx -> ... ->' allows multiple receivers flexibility

xxx -> [foo, ... -> bar]