Re: proposed syntax for tuple: t{} and TypeTuple: T{} (cf precedent of q{...})

2016-04-08 Thread Nick Treleaven via Digitalmars-d
On Tuesday, 5 April 2016 at 14:00:46 UTC, ag0aep6g wrote: I'm not sure if the new syntax is worth adding, though. `T{...}` (or `T[...]`) saves just one character over `T!(...)`. The latter can be done without touching the language. For the value tuple, one can do `alias t =

Re: proposed syntax for tuple: t{} and TypeTuple: T{} (cf precedent of q{...})

2016-04-05 Thread Timon Gehr via Digitalmars-d
On 05.04.2016 22:48, ZombineDev wrote: On Tuesday, 5 April 2016 at 20:13:59 UTC, Timon Gehr wrote: On 05.04.2016 17:29, ZombineDev wrote: On Tuesday, 5 April 2016 at 05:45:08 UTC, Timothee Cour wrote: {} for tuples hasn't worked out since it was deemed ambiguous with delegate syntax (was it

Re: proposed syntax for tuple: t{} and TypeTuple: T{} (cf precedent of q{...})

2016-04-05 Thread ZombineDev via Digitalmars-d
On Tuesday, 5 April 2016 at 20:13:59 UTC, Timon Gehr wrote: On 05.04.2016 17:29, ZombineDev wrote: On Tuesday, 5 April 2016 at 05:45:08 UTC, Timothee Cour wrote: {} for tuples hasn't worked out since it was deemed ambiguous with delegate syntax (was it for the case of empty

Re: proposed syntax for tuple: t{} and TypeTuple: T{} (cf precedent of q{...})

2016-04-05 Thread Timon Gehr via Digitalmars-d
On 05.04.2016 17:29, ZombineDev wrote: On Tuesday, 5 April 2016 at 05:45:08 UTC, Timothee Cour wrote: {} for tuples hasn't worked out since it was deemed ambiguous with delegate syntax (was it for the case of empty statements/tuple?). How about the following syntax instead: {} //

Re: proposed syntax for tuple: t{} and TypeTuple: T{} (cf precedent of q{...})

2016-04-05 Thread ZombineDev via Digitalmars-d
On Tuesday, 5 April 2016 at 16:34:49 UTC, jmh530 wrote: On Tuesday, 5 April 2016 at 15:29:06 UTC, ZombineDev wrote: Action action = {}; // error: `{}` is an empty tuple, can't be assigned to delegates auto t = {}; // deduced as an empty tuple. Also, the non-empty {} syntax can't be mistaken

Re: proposed syntax for tuple: t{} and TypeTuple: T{} (cf precedent of q{...})

2016-04-05 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 5 April 2016 at 16:56:15 UTC, Jack Stouffer wrote: Tuple and AliasSeq are library types, so the chance that they will be added into the language is slim to none. Yes on Tuple, but AliasSeq actually is in the language (just unnamed there, it is what you get with T... in a template

Re: proposed syntax for tuple: t{} and TypeTuple: T{} (cf precedent of q{...})

2016-04-05 Thread Jack Stouffer via Digitalmars-d
On Tuesday, 5 April 2016 at 05:45:08 UTC, Timothee Cour wrote: {} for tuples hasn't worked out since it was deemed ambiguous with delegate syntax (was it for the case of empty statements/tuple?). How about the following syntax instead: {} // delegate (existing syntax) q{...} // string

Re: proposed syntax for tuple: t{} and TypeTuple: T{} (cf precedent of q{...})

2016-04-05 Thread jmh530 via Digitalmars-d
On Tuesday, 5 April 2016 at 15:29:06 UTC, ZombineDev wrote: Action action = {}; // error: `{}` is an empty tuple, can't be assigned to delegates auto t = {}; // deduced as an empty tuple. Also, the non-empty {} syntax can't be mistaken for a function literal because non-empty function literals

Re: proposed syntax for tuple: t{} and TypeTuple: T{} (cf precedent of q{...})

2016-04-05 Thread ZombineDev via Digitalmars-d
On Tuesday, 5 April 2016 at 05:45:08 UTC, Timothee Cour wrote: {} for tuples hasn't worked out since it was deemed ambiguous with delegate syntax (was it for the case of empty statements/tuple?). How about the following syntax instead: {} // delegate (existing syntax) q{...} // string

Re: proposed syntax for tuple: t{} and TypeTuple: T{} (cf precedent of q{...})

2016-04-05 Thread ag0aep6g via Digitalmars-d
On 05.04.2016 07:45, Timothee Cour via Digitalmars-d wrote: How about the following syntax instead: {} // delegate (existing syntax) q{...} // string literal (existing syntax) t{...} // tuple(a,b) (proposed syntax) T{...} // TypeTuple!(a,b) (proposed syntax) In existing syntax, most

proposed syntax for tuple: t{} and TypeTuple: T{} (cf precedent of q{...})

2016-04-04 Thread Timothee Cour via Digitalmars-d
{} for tuples hasn't worked out since it was deemed ambiguous with delegate syntax (was it for the case of empty statements/tuple?). How about the following syntax instead: {} // delegate (existing syntax) q{...} // string literal (existing syntax) t{...} // tuple(a,b) (proposed syntax)