On Monday, 9 May 2016 at 13:09:24 UTC, Jacob Carlborg wrote:
On 2016-05-09 14:46, John wrote:
C# 7's tuples are something different though. They don't even
map to
System.Tuple. The syntax is:
(int x, int y) GetPoint() {
return (500, 400);
}
var p = GetPoint();
On 2016-05-09 14:46, John wrote:
C# 7's tuples are something different though. They don't even map to
System.Tuple. The syntax is:
(int x, int y) GetPoint() {
return (500, 400);
}
var p = GetPoint();
Console.WriteLine($"{p.x}, {p.y}");
Would be nice to have in D. Both with
On Monday, 9 May 2016 at 00:44:09 UTC, Peter Häggman wrote:
Their tuples seem to be a complete DIY:
https://msdn.microsoft.com/en-us/library/system.tuple(v=vs.110).aspx
C# 7's tuples are something different though. They don't even map
to System.Tuple. The syntax is:
(int x, int y)
On Monday, 9 May 2016 at 00:44:09 UTC, Peter Häggman wrote:
I wouldn't be surpised to see in the implementation an array of
variant or something like that, explaining why it's limited to
octuples [1].
You can also use anonymous types: http://ideone.com/WBRunL they
are predated by tuples.
On Monday, 9 May 2016 at 00:44:09 UTC, Peter Häggman wrote:
Their tuples seem to be a complete DIY:
https://msdn.microsoft.com/en-us/library/system.tuple(v=vs.110).aspx
I wouldn't be surpised to see in the implementation an array of
variant or something like that, explaining why it's limited
On Friday, 6 May 2016 at 14:33:22 UTC, Andrei Alexandrescu wrote:
Most of them are also present in D, yay.
https://www.reddit.com/r/programming/comments/4i3h77/some_new_c7_features/
Added a comment:
https://www.reddit.com/r/programming/comments/4i3h77/some_new_c7_features/d2v5lu6
Andrei
On Friday, 6 May 2016 at 23:51:59 UTC, Steven Schveighoffer wrote:
Of COURSE D supports local ref variables:
struct RefVar(T)
{
private T * var;
this(ref T v) { var = }
auto get() { return *var; }
alias this get;
}
ref get() return {...
Which is unsafe even if the ctor is marked
On 5/7/16 1:29 AM, Timon Gehr wrote:
On 06.05.2016 18:58, Kagamin wrote:
On Friday, 6 May 2016 at 14:33:22 UTC, Andrei Alexandrescu wrote:
Added a comment:
https://www.reddit.com/r/programming/comments/4i3h77/some_new_c7_features/d2v5lu6
D has ref variables? Not for a long time though.
On 06.05.2016 18:58, Kagamin wrote:
On Friday, 6 May 2016 at 14:33:22 UTC, Andrei Alexandrescu wrote:
Added a comment:
https://www.reddit.com/r/programming/comments/4i3h77/some_new_c7_features/d2v5lu6
D has ref variables? Not for a long time though.
D actually does not support ref local
On Friday, 6 May 2016 at 14:33:22 UTC, Andrei Alexandrescu wrote:
Added a comment:
https://www.reddit.com/r/programming/comments/4i3h77/some_new_c7_features/d2v5lu6
D has ref variables? Not for a long time though.
Most of them are also present in D, yay.
https://www.reddit.com/r/programming/comments/4i3h77/some_new_c7_features/
Added a comment:
https://www.reddit.com/r/programming/comments/4i3h77/some_new_c7_features/d2v5lu6
Andrei
11 matches
Mail list logo