This is a long shot but I figured I'd ask if only to provide an interesting
use-case for concepts.
How far is the current design (& implementation) from supporting the definition
of Tuple-like structure? Here's a sketch of what it could look like:
type Tuple[T: static[varargs]] = concept c
for i in 0 .. T.arity-1:
c[i] is T[i]
There's a few assumptions here which I'll call out:
1. passing in a variable number of type arguments (I made up the
static[varargs] type)
2. executing code within the concept's body (metaprogramming), not just
represent compilable patterns. How would we distinguish between a for pattern
and actually running a for statement? Maybe put the block into a static scope?
3. the compiler would also need to infer that c[i] is T[i] is not expressing
c[int] is T[i] but rather c[static[1]] is T[i] (and so on for each
instantiations of i).
Thoughts? Is the current design forward-compatible to eventually express such
concepts?