nevalang / neva

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

Proposal: `any` as default type-argument for node with any number of type-parameters, not just one #623

Open emil14 opened 1 month ago

emil14 commented 1 month ago

We can

For{Println}

But we have to

Map<int, int>{Decr<int>}

Would be nice to be able to

Map{Decr<int>}

When we don't care (when we ok with any) - e.g. we Println data or something like that

emil14 commented 1 month ago

Don't forget that if user passed at least one type arg and there's more, user must pass all the others

Also, if we gonna do the same for types, logic should be the same

Another thing could be allowing specifying const without type. However, it's not clear how complex types should validated them (and should they at all? If that's any?)

(Thing with const should be problem for IrGen step. And also think about irgen when doing this kind of stuff)