On Wednesday, 19 September 2018 at 21:48:40 UTC, Timon Gehr wrote:
On 19.09.2018 23:14, 12345swordy wrote:
On Tuesday, 3 July 2018 at 16:11:05 UTC, 12345swordy wrote:
On Thursday, 28 June 2018 at 13:24:11 UTC, Timon Gehr wrote:
[...]
Is there any way we can help on this?
*Bump* I want this
On Saturday, 13 January 2018 at 18:28:55 UTC, Timon Gehr wrote:
However, this proposal is independent of all the other ones, so
in the end it is up to Walter and Andrei.
Have there been any discussions regarding the semantics of _?
struct G { ~this() { writeln("destruct"); } }
void main() {
On 19.09.2018 23:14, 12345swordy wrote:
On Tuesday, 3 July 2018 at 16:11:05 UTC, 12345swordy wrote:
On Thursday, 28 June 2018 at 13:24:11 UTC, Timon Gehr wrote:
On 26.06.2018 11:55, Francesco Mecca wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have sta
On Tuesday, 3 July 2018 at 16:11:05 UTC, 12345swordy wrote:
On Thursday, 28 June 2018 at 13:24:11 UTC, Timon Gehr wrote:
On 26.06.2018 11:55, Francesco Mecca wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple e
On Thursday, 28 June 2018 at 13:24:11 UTC, Timon Gehr wrote:
On 26.06.2018 11:55, Francesco Mecca wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
[...]
What is the status of the DIP? Is i
On 26.06.2018 11:55, Francesco Mecca wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
[...]
What is the status of the DIP? Is it ready to be proposed and dicussed?
I still need to incorpo
On Tuesday, 26 June 2018 at 09:55:10 UTC, Francesco Mecca wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
[...]
What is the status of the DIP? Is it ready to be proposed and
dicussed?
L
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
[...]
What is the status of the DIP? Is it ready to be proposed and
dicussed?
On 15.03.2018 17:14, Timon Gehr wrote:
We could make lambdas consistent with proposal 5:
...
Good point. That's indeed the intention, but I didn't get around to
updating the grammar section.
Nevermind, it's already there, as the grammar shares "Parameters"
between functions and function
On 15.03.2018 14:42, Nick Treleaven wrote:
On Wednesday, 17 January 2018 at 06:44:21 UTC, Timon Gehr wrote:
It uses tuples because it uses zip. The code does not compile today,
because the lambda I'm passing to "map" has two parameters:
auto a = [1, 2, 4, 7, 2];
auto b = [3, 5, 3, 2, 4];
// a
On 15.03.2018 11:45, ixid wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
auto (a, b) = (1, 2);
For the assignment and unpacking grammar why not adopt [...] Go syntax?
...
It does not fit in.
auto a, b = 1, 2; // Creates two new variables with the values 1 and 2
auto c
On Thursday, 15 March 2018 at 14:11:47 UTC, Stefan Koch wrote:
On Thursday, 15 March 2018 at 14:07:12 UTC, JN wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
https://github.com/tgehr/DIPs/b
On Thursday, 15 March 2018 at 14:07:12 UTC, JN wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
I may be out of the loop h
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
I may be out of the loop here, but what is the actual usecase for
tuples? What b
On Wednesday, 17 January 2018 at 06:44:21 UTC, Timon Gehr wrote:
It uses tuples because it uses zip. The code does not compile
today, because the lambda I'm passing to "map" has two
parameters:
auto a = [1, 2, 4, 7, 2];
auto b = [3, 5, 3, 2, 4];
// auto c = zip(a, b).map!((x, y) => x + y); //
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
auto (a, b) = (1, 2);
For the assignment and unpacking grammar why not adopt the more
streamlined Go syntax?
auto a, b = 1, 2; // Creates two new variables with the values 1
and 2
auto c, d = 1, (2,3); // A normal variable and a
On 20.02.2018 01:57, Timothee Cour wrote:
On Mon, Feb 19, 2018 at 4:05 PM, Timon Gehr via Digitalmars-d
wrote:
On 20.02.2018 00:53, Timothee Cour wrote:
Sure! Also, this:
void main(string[] args){
enforce(args.length==5, "Invalid args");
auto (infile, colname, repl, outfile) = arg
On Mon, Feb 19, 2018 at 4:05 PM, Timon Gehr via Digitalmars-d
wrote:
> On 20.02.2018 00:53, Timothee Cour wrote:
>>
> Sure! Also, this:
>
> void main(string[] args){
> enforce(args.length==5, "Invalid args");
> auto (infile, colname, repl, outfile) = args[1..5].unpack;
> // ...
> }
h
On 20.02.2018 00:53, Timothee Cour wrote:
great! maybe worth adding to DIP? (even though `unpack` would be
(IIUC) a pure library solution on top of this DIP)
...
Yes. I'll add it to the use cases.
and that would work too I guess?
```
string[4] args=...;
auto (infile, colname, repl, outfile) =
great! maybe worth adding to DIP? (even though `unpack` would be
(IIUC) a pure library solution on top of this DIP)
and that would work too I guess?
```
string[4] args=...;
auto (infile, colname, repl, outfile) = args.unpack;
```
On Mon, Feb 19, 2018 at 3:47 PM, Timon Gehr via Digitalmars-d
wro
On 20.02.2018 00:43, Timon Gehr wrote:
void main(){
auto (infile, colname, repl, outfile) =
args[1..$].unpack!4("Invalid args\n");
}
Actually:
void main(string[] args){
auto (infile, colname, repl, outfile) =
args[1..$].unpack!4("Invalid args\n");
}
On 20.02.2018 00:19, timotheecour wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
This DIP aims to make code like the fol
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
This DIP aims to make code like the following valid D:
...
Would this DIP allow
On 16.02.2018 20:51, Martin Nowak wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On 01/12/2018 11:44 PM, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
Pardon me i
On 16.02.2018 21:01, Martin Nowak wrote:
On 01/14/2018 12:21 AM, Timon Gehr wrote:
what would be the equivalent of this ?
` writeln(tuple!("x", "y", "z")(2, 3, 4).y); `
It would continue to work the same way.
I did consider adding a proposal for built-in named tuple syntax:
writeln((x: 2, y:
On 16.02.2018 21:16, Jonathan M Davis wrote:
On Friday, February 16, 2018 21:01:02 Martin Nowak via Digitalmars-d wrote:
On 01/14/2018 12:21 AM, Timon Gehr wrote:
what would be the equivalent of this ?
` writeln(tuple!("x", "y", "z")(2, 3, 4).y); `
It would continue to work the same way.
I d
On 16.02.2018 21:48, H. S. Teoh wrote:
On Fri, Feb 16, 2018 at 01:16:13PM -0700, Jonathan M Davis via Digitalmars-d
wrote:
On Friday, February 16, 2018 21:01:02 Martin Nowak via Digitalmars-d wrote:
On 01/14/2018 12:21 AM, Timon Gehr wrote:
what would be the equivalent of this ?
` writeln(tup
On Fri, Feb 16, 2018 at 01:16:13PM -0700, Jonathan M Davis via Digitalmars-d
wrote:
> On Friday, February 16, 2018 21:01:02 Martin Nowak via Digitalmars-d wrote:
> > On 01/14/2018 12:21 AM, Timon Gehr wrote:
> > >> what would be the equivalent of this ?
> > >> ` writeln(tuple!("x", "y", "z")(2, 3,
On Friday, February 16, 2018 21:01:02 Martin Nowak via Digitalmars-d wrote:
> On 01/14/2018 12:21 AM, Timon Gehr wrote:
> >> what would be the equivalent of this ?
> >> ` writeln(tuple!("x", "y", "z")(2, 3, 4).y); `
> >
> > It would continue to work the same way.
> >
> > I did consider adding a pro
On 01/14/2018 12:21 AM, Timon Gehr wrote:
>> what would be the equivalent of this ?
>> ` writeln(tuple!("x", "y", "z")(2, 3, 4).y); `
>
> It would continue to work the same way.
>
> I did consider adding a proposal for built-in named tuple syntax:
>
> writeln((x: 2, y: 3, z: 4).y);
>
> (int a,
On 01/14/2018 07:41 PM, Timothee Cour wrote:
> Should definitely be mentioned in the DIP to open that up for discussion;
> it breaks assumptions like sizeof(Tuple)=sum_i : tuple (sizeof(Ti));
That doesn't hold for all cases anyhow, as it seems were talking about
closed tuples that are contiguous i
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On 01/12/2018 11:44 PM, Timon Gehr wrote:
> As promised [1], I have started setting up a DIP to improve tuple
> ergonomics in D:
>
> https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
Pardon me if things have been said already, can
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
This DIP aims to make code like the following valid D:
---
auto (a, b) = (1, 2);
On Tuesday, 23 January 2018 at 14:58:07 UTC, Petar Kirov
[ZombineDev] wrote:
On Tuesday, 23 January 2018 at 11:04:33 UTC, Atila Neves wrote:
On Sunday, 14 January 2018 at 18:17:38 UTC, Timon Gehr wrote:
On 14.01.2018 19:14, Timothee Cour wrote:
actually I just learned that indeed
sizeof(typeof
On Tuesday, 23 January 2018 at 11:04:33 UTC, Atila Neves wrote:
On Sunday, 14 January 2018 at 18:17:38 UTC, Timon Gehr wrote:
On 14.01.2018 19:14, Timothee Cour wrote:
actually I just learned that indeed
sizeof(typeof(tuple()))=1, but why
is that? (at least for std.typecons.tuple)
maybe worth
On Sunday, 14 January 2018 at 18:17:38 UTC, Timon Gehr wrote:
On 14.01.2018 19:14, Timothee Cour wrote:
actually I just learned that indeed sizeof(typeof(tuple()))=1,
but why
is that? (at least for std.typecons.tuple)
maybe worth mentioning that in the DIP (with rationale)
It's inherited from
On Wednesday, 17 January 2018 at 19:43:03 UTC, Manu wrote:
I quite like C++ explicit unpacking (using ...), and I wouldn't
be upset to
see that appear here too.
FWIW C++17 has structured binding:
http://en.cppreference.com/w/cpp/language/structured_binding
auto [x,y] = f()
On 17.01.2018 20:43, Manu wrote:
On 12 January 2018 at 14:44, Timon Gehr via Digitalmars-d
mailto:digitalmars-d@puremagic.com>> wrote:
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.
On 12 January 2018 at 14:44, Timon Gehr via Digitalmars-d <
digitalmars-d@puremagic.com> wrote:
> As promised [1], I have started setting up a DIP to improve tuple
> ergonomics in D:
>
> https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
>
>
> This DIP aims to make code like the fo
On Tuesday, 16 January 2018 at 21:21:04 UTC, Timon Gehr wrote:
My thoughts were:
http://forum.dlang.org/post/p3e4al$1jfc$1...@digitalmars.com
But as it has been requested more than once and it is a feature
of existing Phobos tuples, I can add a proposal to the DIP that
can be accepted/rejecte
On 1/17/18 1:44 AM, Timon Gehr wrote:
On 17.01.2018 02:20, Steven Schveighoffer wrote:
On 1/12/18 5:44 PM, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
Awesome! I can s
On 17.01.2018 02:20, Steven Schveighoffer wrote:
On 1/12/18 5:44 PM, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
Awesome! I can say I felt a lot more comfortable with t
On 1/12/18 5:44 PM, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
Awesome! I can say I felt a lot more comfortable with the trailing-comma
syntax after our last discussio
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
foreach((sum, diff); [(1, 2), (4, 3)].map!((a, b) => (a + b, a
- b)))
{
writeln(sum, " ", diff);
}
I'm not a big fan of the foreach syntax. It's so easy to forget
or accidentally add parentheses while coding, or read it wrongl
On 16.01.2018 22:46, jmh530 wrote:
On Tuesday, 16 January 2018 at 21:21:04 UTC, Timon Gehr wrote:
My thoughts were:
http://forum.dlang.org/post/p3e4al$1jfc$1...@digitalmars.com
A starting point could be an unnamed tuple built-in tuple type, but also
not yet deprecating the built-in named tup
On Tuesday, 16 January 2018 at 21:21:04 UTC, Timon Gehr wrote:
My thoughts were:
http://forum.dlang.org/post/p3e4al$1jfc$1...@digitalmars.com
A starting point could be an unnamed tuple built-in tuple type,
but also not yet deprecating the built-in named tuple type in
std.typecons.
But as
On 16.01.2018 22:03, aliak wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
...
Oh Yes!
Question, would named tuples be
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
...
Oh Yes!
Question, would named tuples be able to be worked in or is that
wa
On 1/14/2018 6:55 AM, Q. Schroll wrote:
How is (1, 2) different from [1, 2] (static array)?
It's a very good question. It's corollary is how is (1, 2) different from
struct S { int a, b; }
It does turn out that int[2] is structurally (!) the same as struct S. This is a
property I've taken
On 1/14/2018 10:17 AM, Timon Gehr wrote:
It's inherited from C, where all struct instances have size at least 1. (Such
that each of them has a distinct address.)
There are some peculiarities with that, like with multiple inheritance sometimes
the size really is zero :-)
On Sun, Jan 14, 2018 at 10:17 AM, Timon Gehr via Digitalmars-d
wrote:
> On 14.01.2018 19:14, Timothee Cour wrote:
>>
>> actually I just learned that indeed sizeof(typeof(tuple()))=1, but why
>> is that? (at least for std.typecons.tuple)
>> maybe worth mentioning that in the DIP (with rationale)
>
On 14.01.2018 19:14, Timothee Cour wrote:
actually I just learned that indeed sizeof(typeof(tuple()))=1, but why
is that? (at least for std.typecons.tuple)
maybe worth mentioning that in the DIP (with rationale)
It's inherited from C, where all struct instances have size at least 1.
(Such that
actually I just learned that indeed sizeof(typeof(tuple()))=1, but why
is that? (at least for std.typecons.tuple)
maybe worth mentioning that in the DIP (with rationale)
On Sun, Jan 14, 2018 at 8:18 AM, Timon Gehr via Digitalmars-d
wrote:
> On 14.01.2018 15:55, Q. Schroll wrote:
>>
>> On Friday,
On 14.01.2018 15:55, Q. Schroll wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
[...]
This DIP aims to make code like the following valid D:
---
auto (a, b) = (1, 2);
(int a, int b) = (1, 2);
---
[...]
How is (1, 2) different from [1, 2] (static array)?
The first is a t
On Sunday, 14 January 2018 at 00:01:15 UTC, rikki cattermole
wrote:
On 13/01/2018 11:45 PM, Timothee Cour wrote:
some people have suggested using `{a, b}` instead of `(a,b)` ;
this
would not work because of ambiguity, eg:
`auto fun(){ return {}; }`
already has a meaning, so the empty tuple woul
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
[...]
This DIP aims to make code like the following valid D:
---
auto (a, b) = (1, 2);
(int a, int b) = (1, 2);
---
[...]
How is (1, 2) different from [1, 2] (static array)? It makes no
sense to me to have both and probably a bunch
On 13/01/2018 11:45 PM, Timothee Cour wrote:
some people have suggested using `{a, b}` instead of `(a,b)` ; this
would not work because of ambiguity, eg:
`auto fun(){ return {}; }`
already has a meaning, so the empty tuple would not work.
so `()` is indeed better.
Easy fix, tuples must have a l
some people have suggested using `{a, b}` instead of `(a,b)` ; this
would not work because of ambiguity, eg:
`auto fun(){ return {}; }`
already has a meaning, so the empty tuple would not work.
so `()` is indeed better.
On Fri, Jan 12, 2018 at 2:44 PM, Timon Gehr via Digitalmars-d
wrote:
> As pro
On 13.01.2018 23:57, Timothee Cour wrote:
the DIP says this replace std.typecons.TypeTuple however no mention is
made of named arguments, so I don't see how they could be a
replacement (nor how would that allow for a migration path) without
mentioning a word on this, eg:
what would be the equiva
the DIP says this replace std.typecons.TypeTuple however no mention is
made of named arguments, so I don't see how they could be a
replacement (nor how would that allow for a migration path) without
mentioning a word on this, eg:
what would be the equivalent of this ?
` writeln(tuple!("x", "y", "z
it would also solve a long-standing issue of passing runtime optional
arguments along with variadic templates, eg:
current:
```
# current: bad, causes template bloat (1 template per call site)
void log(string file=__FILE__, int line=__LINE__, T...)(T a);
# usage:
log(1, "foo");
# with this DIP
vo
On Saturday, 13 January 2018 at 21:05:27 UTC, Timon Gehr wrote:
On 13.01.2018 21:49, Timon Gehr wrote:
auto (name, email) = fetchUser();
vs
auto {name, email} = fetchUser();
BTW: What do you think each of those do?
I'd expect the following:
---
auto (name, email) = fetchUser();
=>
auto
On Sat, 13 Jan 2018 22:10:39 +, rjframe wrote:
> On Sat, 13 Jan 2018 21:57:31 +0100, Timon Gehr wrote:
>
>> On 13.01.2018 21:39, rjframe wrote:
>>> Python and Pony use (). C++17 uses [].
>>
>> Any idea why C++17 went with [] ?
>
> I don't know; the paper[1] says it was due to "feedback from
On Saturday, 13 January 2018 at 20:57:31 UTC, Timon Gehr wrote:
On 13.01.2018 21:39, rjframe wrote:
Python and Pony use (). C++17 uses [].
Any idea why C++17 went with [] ?
Perhaps D should use <>? [not a
serious question]
It was hard for me not to use angled brackets for templates
when I
On Sat, 13 Jan 2018 21:57:31 +0100, Timon Gehr wrote:
> On 13.01.2018 21:39, rjframe wrote:
>> Python and Pony use (). C++17 uses [].
>
> Any idea why C++17 went with [] ?
I don't know; the paper[1] says it was due to "feedback from the EWG
session in Jacksonville".
>
> It would actually be u
On 13.01.2018 21:49, Timon Gehr wrote:
auto (name, email) = fetchUser();
vs
auto {name, email} = fetchUser();
BTW: What do you think each of those do?
I'd expect the following:
---
auto (name, email) = fetchUser();
=>
auto __tmp = fetchUser();
auto name = __tmp[0], email = __tmp[1];
---
On 13.01.2018 21:39, rjframe wrote:
Python and Pony use (). C++17 uses [].
Any idea why C++17 went with [] ?
Perhaps D should use <>? [not a
serious question]
It was hard for me not to use angled brackets for templates when I started
with D, but now it's second nature. I think you're right,
On 13.01.2018 20:43, aberba wrote:
When I raised this feature for D, suggestions on the use of () instead
of {} got me concerned. All languages that I know to have this feature
(known as destructuring) use curly braces.
It seems that this is actually not the case.
Anyway, I'd suggest having
On Sat, 13 Jan 2018 19:43:48 +, aberba wrote:
>
> When I raised this feature for D, suggestions on the use of () instead
> of {} got me concerned. All languages that I know to have this feature
> (known as destructuring) use curly braces. Thats what kotlin and
> JavaScript (that I know have s
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
This DIP aims to make code like the following valid D:
---
auto (a, b) = (1, 2);
On 13.01.2018 19:11, Timothee Cour wrote:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md#proposal-6-placeholder-name-_
Symbols with the name _ should not be inserted into the symbol table.
why not use `?` instead of `_` ?
no breaking change and should be unambiguous with (e
On 13.01.2018 19:07, Timothee Cour wrote:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md#proposal-4-unpacking-assignments
```
(a, b) = t;
// shouldn't it be:
auto (a, b) = t;
```
?
No, but there was a mistake in the code that explains the confusion.
It should be:
(int, str
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md#proposal-6-placeholder-name-_
> Symbols with the name _ should not be inserted into the symbol table.
why not use `?` instead of `_` ?
no breaking change and should be unambiguous with (expr ? expr : expr) syntax
On Fri, Jan 12
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md#proposal-4-unpacking-assignments
```
(a, b) = t;
// shouldn't it be:
auto (a, b) = t;
```
?
On Sat, Jan 13, 2018 at 9:52 AM, Mengu via Digitalmars-d
wrote:
> On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
>>
>> A
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
[...]
how do we vote for / support this DIP?
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
[1] https://forum.dlang.org/post/or625h$2hns$1...@digitalmars.com
Awesome!!! Than
On 13.01.2018 03:08, jmh530 wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
[snip]
I'm glad you're working on this.
Proposal 1 is a little terse in explaining what you mean by unpacking
A
On 13.01.2018 12:43, Jacob Carlborg wrote:
On 2018-01-12 23:44, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
Perhaps I don't have enough knowledge about the existing different types
of tuples but Proposal 1 [1] says:
"We add the follow
On Saturday, 13 January 2018 at 00:37:48 UTC, Chris M. wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
[...]
Yes please
Very much agree.
On 2018-01-12 23:44, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
Perhaps I don't have enough knowledge about the existing different types
of tuples but Proposal 1 [1] says:
"We add the following syntactic sugar to unpack AliasSeq's"
B
On Saturday, 13 January 2018 at 00:51:51 UTC, Timon Gehr wrote:
On 13.01.2018 01:20, Mark wrote:
int (x,y) = f(1, 2); // x=3, y=-1
int (w,z) = (1, 2).f() // same as above, UFCS
int (u,v) = (1, 2).(sum, diff) // same as above, "lambda tuple"
In the last example, (sum, diff) is basically lowered
On Saturday, 13 January 2018 at 02:15:37 UTC, Basile B. wrote:
On Saturday, 13 January 2018 at 02:08:03 UTC, jmh530 wrote:
[snip]
Also, Proposal 1 starts with this example
auto (a, b) = tuple(1, "2");
(int a, string b) = tuple(1, "2");
but it also looks natural to be able to write
(int, string)
On Saturday, 13 January 2018 at 02:18:20 UTC, Basile B. wrote:
On Saturday, 13 January 2018 at 02:15:37 UTC, Basile B. wrote:
On Saturday, 13 January 2018 at 02:08:03 UTC, jmh530 wrote:
[...]
Really ?
After the type should be the declarator. In this example
there's no declarator but if you a
On Saturday, 13 January 2018 at 02:08:03 UTC, jmh530 wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
[snip]
I'm glad you're working on this.
Proposal 1 is a little terse in explaining what
On Saturday, 13 January 2018 at 02:15:37 UTC, Basile B. wrote:
On Saturday, 13 January 2018 at 02:08:03 UTC, jmh530 wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
[snip]
I'm glad you're w
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
[snip]
I'm glad you're working on this.
Proposal 1 is a little terse in explaining what you mean by
unpacking AliasSeqs. You might explain it in a
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
+1, please.
On 12/01/2018 10:44 PM, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
This DIP aims to make code like the following valid D:
---
auto (a, b) = (1, 2);
(int a, int b) = (1
On 13.01.2018 01:20, Mark wrote:
Could we also support function tuples?
In principle, yes, though I imagine it is a lot harder to argue for its
inclusion than for that of the features currently proposed in the DIP,
because existing language features already come rather close.
For instance
Should include an example of returning a tuple from a function. I
know one of the pains with variadic templates is that they can't
be returned.
So maybe something that goes over the following use case:
auto returnTuple(Args...)(Args args)
{
return args;
}
(int a, float b) = returnTuple(
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
[...]
Yes please
On 13.01.2018 00:16, Basile B. wrote:
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
markdown trick: you can use
```diff
```
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
This DIP aims to make code like the following valid D:
---
auto (a, b) = (1, 2);
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote:
As promised [1], I have started setting up a DIP to improve
tuple ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
markdown trick: you can use
```diff
```
for a nicer grammar section.
On 12.01.2018 23:44, Timon Gehr wrote:
---
auto (a, b) = (1, 2);
(int a, int b) = (1, 2);
---
(The two lines are two independent examples :o).)
On 12.01.2018 23:44, Timon Gehr wrote:
...
Before going ahead with it, I'd like some preliminary community input:
...
Also, if you have more links to forum posts requesting related features,
that would be useful (googling turned up the ones that are in the DIP,
but I know that there were more)
As promised [1], I have started setting up a DIP to improve tuple
ergonomics in D:
https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md
This DIP aims to make code like the following valid D:
---
auto (a, b) = (1, 2);
(int a, int b) = (1, 2);
---
---
foreach((sum, diff); [(1, 2)
97 matches
Mail list logo