We are forking D

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Mon Jan 8 07:00:39 UTC 2024


I kinda wish we had tuples that are not alias sequences right now.

1036e could be (at least in my opinion) better with them.

```
tuple(prefix, expression or positional, ...)
```

Removes the possibility of ref yes, but does introduce the possibility 
of f-string positional argument support and easily passing it around.

``i"prefix1${1}prefix2%{arg}"``

becomes

``tuple(PrefixType!("prefix1"), PositionType!1, PrefixType!("prefix2"), 
arg)``

```d
void writeln(Args...)(Args args) {
	static foreach(i, Arg; Args) {
		static if (is(Arg : typeof(tuple))) {
			// is tuple for arg i
		}
	}
}
```


More information about the Digitalmars-d mailing list