[Bluej-discuss] confusion over =
Aryeh M. Friedman
aryeh.friedman at gmail.com
Fri Nov 30 10:48:39 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Lon Levy wrote:
> I would be careful with using "is equal" for "==". Instead, I use
> "is the same as". This is important because in Java the "==" is
> overloaded to mean 'the same value' for primitives and 'the same
> instance' for objects. Then Java really muddies the waters where
> some Strings are "==" the same and others are not, even when they
> are the same values. (More on this if you wish). Use of methods
> can clarify what is going on.
I think sun &^%^'ed up when they decide to use == for primatives and
equals() for objects.... it brings my single biggest issue with Java
if your going to make everything inherit from Object why have
primatives at all... many newer langs like ruby make everything a
first class object
- --
Aryeh M. Friedman
FloSoft Systems
Developer, not business, friendly
http://www.flosoft-systems.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHT+qH358R5LPuPvsRArCMAJ45oZUENwftAjbHEZSNz91P2Ri6/ACfShos
VU0nkiy5X/E0MnwZMRrR37g=
=7E42
-----END PGP SIGNATURE-----
More information about the bluej-discuss
mailing list