Re: Why is ElementType!(char[]) == dchar?

2016-07-09 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Jul 09, 2016 at 11:57:36PM +1200, rikki cattermole via Digitalmars-d-learn wrote: > On 09/07/2016 11:46 PM, Tofu Ninja wrote: > > On Saturday, 9 July 2016 at 11:35:24 UTC, Tofu Ninja wrote: > > > On Saturday, 9 July 2016 at 11:29:18 UTC, ketmar wrote: > > > > On Saturday, 9 July 2016 at

Re: Why is ElementType!(char[]) == dchar?

2016-07-09 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 9 July 2016 at 11:57:36 UTC, rikki cattermole wrote: That implementation is weird in that it returns a dchar instead of the raw type. Which is decoding, but it is not auto decoding. Auto decoding involves the foreach statement. You have that backwards. foreach only decodes if you

Re: Why is ElementType!(char[]) == dchar?

2016-07-09 Thread ketmar via Digitalmars-d-learn
On Saturday, 9 July 2016 at 11:57:36 UTC, rikki cattermole wrote: In this case, its not aut odecoding. ElementType is using std.range : front for array's since they do not provide a front method. That implementation is weird in that it returns a dchar hello, autodecoding.

Re: Why is ElementType!(char[]) == dchar?

2016-07-09 Thread Lodovico Giaretta via Digitalmars-d-learn
On Saturday, 9 July 2016 at 11:46:14 UTC, Tofu Ninja wrote: On Saturday, 9 July 2016 at 11:35:24 UTC, Tofu Ninja wrote: On Saturday, 9 July 2016 at 11:29:18 UTC, ketmar wrote: On Saturday, 9 July 2016 at 11:24:01 UTC, Tofu Ninja wrote: Seems pretty silly to me... due to universally beloved

Re: Why is ElementType!(char[]) == dchar?

2016-07-09 Thread rikki cattermole via Digitalmars-d-learn
On 09/07/2016 11:46 PM, Tofu Ninja wrote: On Saturday, 9 July 2016 at 11:35:24 UTC, Tofu Ninja wrote: On Saturday, 9 July 2016 at 11:29:18 UTC, ketmar wrote: On Saturday, 9 July 2016 at 11:24:01 UTC, Tofu Ninja wrote: Seems pretty silly to me... due to universally beloved autodecoding.

Re: Why is ElementType!(char[]) == dchar?

2016-07-09 Thread Tofu Ninja via Digitalmars-d-learn
On Saturday, 9 July 2016 at 11:35:24 UTC, Tofu Ninja wrote: On Saturday, 9 July 2016 at 11:29:18 UTC, ketmar wrote: On Saturday, 9 July 2016 at 11:24:01 UTC, Tofu Ninja wrote: Seems pretty silly to me... due to universally beloved autodecoding. Hmmm... I dont really know the history of

Re: Why is ElementType!(char[]) == dchar?

2016-07-09 Thread Tofu Ninja via Digitalmars-d-learn
On Saturday, 9 July 2016 at 11:29:18 UTC, ketmar wrote: On Saturday, 9 July 2016 at 11:24:01 UTC, Tofu Ninja wrote: Seems pretty silly to me... due to universally beloved autodecoding. Hmmm... I dont really know the history of autodecoding, why was that supposed to be a good idea?

Re: Why is ElementType!(char[]) == dchar?

2016-07-09 Thread ketmar via Digitalmars-d-learn
On Saturday, 9 July 2016 at 11:24:01 UTC, Tofu Ninja wrote: Seems pretty silly to me... due to universally beloved autodecoding.

Re: Why is ElementType!(char[]) == dchar?

2016-07-09 Thread rikki cattermole via Digitalmars-d-learn
On 09/07/2016 11:24 PM, Tofu Ninja wrote: Seems pretty silly to me... http://dlang.org/phobos/std_range_primitives.html#.front

Why is ElementType!(char[]) == dchar?

2016-07-09 Thread Tofu Ninja via Digitalmars-d-learn
Seems pretty silly to me...