Thread overview
IFTI needs to be updated if you accept tuples
May 27
Basile B.
May 27
Sergey
May 28
Basile B.
May 28
Basile B.
May 29
Basile B.
May 27

things like

void test(T,U,V)((T,U,V) tuv){}

need to work with

test((0.1, 1, false)) //  T= double, U = int, V = bool

just saying

May 27

On Monday, 27 May 2024 at 17:17:41 UTC, Basile B. wrote:

>

things like

void test(T,U,V)((T,U,V) tuv){}

need to work with

test((0.1, 1, false)) //  T= double, U = int, V = bool

just saying

You need to add expand currently https://dlang.org/library/std/typecons/tuple.expand.html
Because D doesn’t have real tuples.

But our hope with Timon

May 28

On Monday, 27 May 2024 at 18:17:28 UTC, Sergey wrote:

>

On Monday, 27 May 2024 at 17:17:41 UTC, Basile B. wrote:

>

things like

void test(T,U,V)((T,U,V) tuv){}

need to work with

test((0.1, 1, false)) //  T= double, U = int, V = bool

just saying

You need to add expand currently https://dlang.org/library/std/typecons/tuple.expand.html
Because D doesn’t have real tuples.

But our hope with Timon

implemented here. IFTI might me a little different compared to IGA. In first palce I did not want to use the same name as IGA was a little under and also did other things ;)

May 28

On Tuesday, 28 May 2024 at 01:16:55 UTC, Basile B. wrote:

>

On Monday, 27 May 2024 at 18:17:28 UTC, Sergey wrote:

>

On Monday, 27 May 2024 at 17:17:41 UTC, Basile B. wrote:

>

things like

void test(T,U,V)((T,U,V) tuv){}

need to work with

test((0.1, 1, false)) //  T= double, U = int, V = bool

just saying

You need to add expand currently https://dlang.org/library/std/typecons/tuple.expand.html
Because D doesn’t have real tuples.

But our hope with Timon

implemented here. IFTI might me a little different compared to IGA. In first palce I did not want to use the same name as IGA was a little under and also did other things ;)

example

struct S[T]
{
    @constructor function make(T t){}
}

function main(): s32
{
    var someEss = S.make(0);
    return 0;
}

that is just nice. in D that is impossible. You have to write

struct S(T)
{
    this(T t){}
}

auto makeAess(T)(T t)
{
    return S!(T)(t);
}

int main()
{
    auto someEss = makeAess(0);
    return 0;
}
May 28
On 5/27/24 19:17, Basile B. wrote:
> things like
> ```d
> void test(T,U,V)((T,U,V) tuv){}
> ```
> 
> need to work with
> 
> ```d
> test((0.1, 1, false)) //  T= double, U = int, V = bool
> ```
> 
> just saying
> 

You are correct. However, it should be fixed regardless. Even if tuple syntax does not make it into the language, I think this code should work today:

```d
static import std.typecons;

void test(T,U,V)(std.typecons.Tuple!(T,U,V) tuv){}
void main(){
    test(std.typecons.tuple(0.1, 1, false));
}
```

However, it seems IFTI currently fails with fully qualified template instantiations.

Your code therefore indeed does not work with the prototype implementation of tuple syntax (which for the time being lowers tuple syntax to fully-qualified std.typecons template instantiations), but I think this is an unrelated bug.
May 29
On Tuesday, 28 May 2024 at 06:47:55 UTC, Timon Gehr wrote:
> However, it seems IFTI currently fails with fully qualified template instantiations.
>
> Your code therefore indeed does not work with the prototype implementation of tuple syntax (which for the time being lowers tuple syntax to fully-qualified std.typecons template instantiations), but I think this is an unrelated bug.

That looks like a bug in IFTI implementation. Filled as https://issues.dlang.org/show_bug.cgi?id=24573.