Re: OT (Was: Re: is(ElementType!(char[2]) == dchar - why?)

2019-06-14 Thread Yatheendra via Digitalmars-d-learn
Could this be rendered an aside for newbies, by way of documentation, specifically the Unicode portion of the Dlang tour? Just never bring up auto-decoding at all, point out UTF8/16/32 and point out the fast correct primitive (byCodeUnit) that lets you iterate over a string's contents

Re: OT (Was: Re: is(ElementType!(char[2]) == dchar - why?)

2018-12-11 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, December 11, 2018 2:11:49 PM MST H. S. Teoh via Digitalmars-d- learn wrote: > On Tue, Dec 11, 2018 at 09:02:41PM +, bauss via Digitalmars-d-learn wrote: > > On Tuesday, 11 December 2018 at 18:10:48 UTC, H. S. Teoh wrote: > [...] > > > > Autodecoding raises its ugly head again. :-/

OT (Was: Re: is(ElementType!(char[2]) == dchar - why?)

2018-12-11 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Dec 11, 2018 at 09:02:41PM +, bauss via Digitalmars-d-learn wrote: > On Tuesday, 11 December 2018 at 18:10:48 UTC, H. S. Teoh wrote: [...] > > Autodecoding raises its ugly head again. :-/ [...] > Has it ever had anything else? LOL... well, we (or some of us) were deceived by its

Re: is(ElementType!(char[2]) == dchar - why?

2018-12-11 Thread bauss via Digitalmars-d-learn
>     writeln( >     typeid(ElementType!(char[2])) >     ); > >     static assert(is(ElementType!(char[2]) == dchar)); // > why? > } > > ? > > https://run.dlang.io/is/Q74yHm Because docs: https://dlang.org/phobos/std_range_primitives.html#ElementType What

Re: is(ElementType!(char[2]) == dchar - why?

2018-12-11 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 11 December 2018 at 17:51:56 UTC, Denis Feklushkin wrote: import std.stdio; import std.range.primitives; void main() { writeln( typeid(ElementType!(char[2])) ); static assert(is(ElementType!(char[2]) == dchar)); // why? } ? https://run.dlang.io/is/Q74yHm

Re: is(ElementType!(char[2]) == dchar - why?

2018-12-11 Thread H. S. Teoh via Digitalmars-d-learn
> >     typeid(ElementType!(char[2])) > >     ); > > > >     static assert(is(ElementType!(char[2]) == dchar)); // why? > > } > > > > ? > > > > https://run.dlang.io/is/Q74yHm > > Because docs: https://dlang.org/phobos/std_range_primitives.html

Re: is(ElementType!(char[2]) == dchar - why?

2018-12-11 Thread rikki cattermole via Digitalmars-d-learn
On 12/12/2018 6:51 AM, Denis Feklushkin wrote: import std.stdio; import std.range.primitives; void main() {     writeln(     typeid(ElementType!(char[2]))     );     static assert(is(ElementType!(char[2]) == dchar)); // why? } ? https://run.dlang.io/is/Q74yHm Because docs: https

is(ElementType!(char[2]) == dchar - why?

2018-12-11 Thread Denis Feklushkin via Digitalmars-d-learn
import std.stdio; import std.range.primitives; void main() { writeln( typeid(ElementType!(char[2])) ); static assert(is(ElementType!(char[2]) == dchar)); // why? } ? https://run.dlang.io/is/Q74yHm