lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Actually, I think C's use of == for equality is consistent with other tests
like it, namely !=, <=, and =>. So I kinda like == for an equality test.

> From: "Michael T. Richter" <mtr@igs.net>
> Organization: Half-Baked Software
> Reply-To: lua-l@tecgraf.puc-rio.br
> Date: Tue, 27 Mar 2001 14:32:18 -0500
> To: Multiple recipients of list <lua-l@tecgraf.puc-rio.br>
> Subject: Re: ? assignments are not expressions ?
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
>> Lua should have had a different operator for assignment anyway (IMO).
>> Decades of suffering C programmers have already proven that this was a
>> bad design choice. Personally, I've always preferred Pascal's assignment
>> operator.
> 
> I agree with you here.  I like the := for assignment and = for equality
> tests much better.  You can't mistype = as := by just leaving your finger
> on the key for a fraction of a second too long for starters....
> 
> - --
> Michael T. Richter
> "Be seeing you."
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGP Personal Privacy 6.5.3
> 
> iQA/AwUBOsDqwbTM3QkE7U/oEQKWNgCgvv7GxND+GDSFf66mQikemPMbmhgAoKS5
> 2AD/m1q7qu/pwZaXhPwE+LtZ
> =2RPA
> -----END PGP SIGNATURE-----
> 
> 
>