pc2 / sus-compiler

A new Hardware Design Language that keeps you in the driver's seat
GNU General Public License v3.0
70 stars 4 forks source link

Variadic Template args #21

Open VonTum opened 2 weeks ago

VonTum commented 2 weeks ago

So I don't really see the need for tuples as a language feature. SUS already has multi-output interfaces, which is a prime motivation for languages to include tuples.

However, for template arguments tuples are really handy. Could we instead provide variadic template types, such that we can pass multiple args together as one "template arg"?

The prime example is the FIFO, again.

myFIFO f
int x, double d, Vec3 v
f.push(x, d, v)

int y, double dd, Vec3 outV = f.pop()