On Monday, 5 September 2016 at 15:50:31 UTC, Lodovico Giaretta
wrote:
On Monday, 5 September 2016 at 15:43:43 UTC, Nick Treleaven
wrote:
We can already (almost do that):
import std.stdio, std.typecons;
void unpack(T...)(Tuple!T tup, out
On Monday, 5 September 2016 at 15:43:43 UTC, Nick Treleaven wrote:
Another solution is to support out argument declarations, as
they are a more general feature. These could then be used as
follows:
Tuple!(int, string) fn();
void unpack(T...)(Tuple!T, out T decls); // new phobos function
On Thursday, 25 August 2016 at 14:43:35 UTC, Dominikus Dittes
Scherkl wrote:
(int, int, int, string) fn()
{
return (3, 2, 1, "meins");
}
int x, y, z;
string s;
(x, y, z, s) = fn();
Another solution is to support out argument declarations, as they
are a more general feature. These could
On Thursday, 25 August 2016 at 14:43:35 UTC, Dominikus Dittes
Scherkl wrote:
But I dislike the named tuple members.
Why not declare them at the calling site?
(int, int, int, string) fn()
{
return (3, 2, 1, "meins");
}
Because how are you supposed to know what each member of the
tuple
On Thursday, 25 August 2016 at 13:41:29 UTC, dom wrote:
https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/
came across the new c# features today. I really liked the
syntax for Tuples (and deconstructors), would be great to have
a similar syntax in D :)
This is
On Thursday, 25 August 2016 at 14:43:35 UTC, Dominikus Dittes
Scherkl wrote:
(int, int, int, string) fn()
{
return (3, 2, 1, "meins");
}
int x, y, z;
string s;
(x, y, z, s) = fn();
See
https://forum.dlang.org/post/ubrngkdmyduepmfkh...@forum.dlang.org
On Thursday, 25 August 2016 at 14:43:35 UTC, Dominikus Dittes
Scherkl wrote:
But I dislike the named tuple members.
Why not declare them at the calling site?
(int, int, int, string) fn()
{
return (3, 2, 1, "meins");
}
int x, y, z;
string s;
(x, y, z, s) = fn();
This is possible:
"
On 25.08.2016 16:43, Dominikus Dittes Scherkl wrote:
On Thursday, 25 August 2016 at 13:41:29 UTC, dom wrote:
https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/
came across the new c# features today. I really liked the syntax for
Tuples (and deconstructors), would be
On Thursday, 25 August 2016 at 15:50:09 UTC, Seb wrote:
https://dlang.org/deprecate.html#Using%20the%20result%20of%20a%20comma%20expression
https://github.com/dlang/dmd/pull/5737
However working out the rules and changes for a Tuple syntax
would be a great topic for a DIP:
On Thursday, 25 August 2016 at 15:02:06 UTC, Steven Schveighoffer
wrote:
On 8/25/16 10:43 AM, Dominikus Dittes Scherkl wrote:
On Thursday, 25 August 2016 at 13:41:29 UTC, dom wrote:
https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/
came across the new c# features
On 8/25/16 10:43 AM, Dominikus Dittes Scherkl wrote:
On Thursday, 25 August 2016 at 13:41:29 UTC, dom wrote:
https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/
came across the new c# features today. I really liked the syntax for
Tuples (and deconstructors), would be
On Thursday, 25 August 2016 at 13:41:29 UTC, dom wrote:
https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/
came across the new c# features today. I really liked the
syntax for Tuples (and deconstructors), would be great to have
a similar syntax in D :)
Pretty
On Thursday, 25 August 2016 at 13:41:29 UTC, dom wrote:
https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/
came across the new c# features today. I really liked the
syntax for Tuples (and deconstructors), would be great to have
a similar syntax in D :)
Yeah, it's
https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/
came across the new c# features today. I really liked the syntax
for Tuples (and deconstructors), would be great to have a similar
syntax in D :)
14 matches
Mail list logo