[your code here]

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Jan 30 00:10:30 UTC 2019


On Tue, Jan 29, 2019 at 11:45:58PM +0000, Stefan Koch via Digitalmars-d wrote:
> On Tuesday, 29 January 2019 at 23:04:33 UTC, H. S. Teoh wrote:
> > On Tue, Jan 29, 2019 at 10:07:23PM +0000, Neia Neutuladh via
> > Digitalmars-d wrote:
> > > On Tue, 29 Jan 2019 13:48:11 -0800, H. S. Teoh wrote:
> > > > On Tue, Jan 29, 2019 at 09:13:16PM +0000, qjnr via > Digitalmars-d
> > > wrote:
> > > >>   if (args.length is 2)
> > > >                    ^^^^
> > > > That's a syntax error.
> > > 
> > > Compiles just fine on my end.
> > 
> > But does it do what's intended, though?
> > 
> > 
> > T
> 
> Yes.
> 
> `is` is the same as `==` except for array and classes where it does
> pointer comparisons.
> since values like integers have no pointer identity.

Wow.  I can't believe I've been coding in D for so long and never knew
this. :-D


T

-- 
Don't drink and derive. Alcohol and algebra don't mix.


More information about the Digitalmars-d mailing list