Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #35391 > unrolled thread
| Started by | Roedy Green <inquiry@mindprod.com> |
|---|---|
| First post | 2016-08-18 06:45 -0700 |
| Last post | 2016-08-18 22:05 -0400 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.java.programmer
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: "equals" - a bad name? Roedy Green <inquiry@mindprod.com> - 2016-08-18 06:45 -0700
Re: "equals" - a bad name? Gene Wirchenko <genew@telus.net> - 2016-08-18 09:42 -0700
Re: "equals" - a bad name? Arne Vajhøj <arne@vajhoej.dk> - 2016-08-18 22:05 -0400
| From | Roedy Green <inquiry@mindprod.com> |
|---|---|
| Date | 2016-08-18 06:45 -0700 |
| Subject | Re: "equals" - a bad name? |
| Message-ID | <0oebrbd0tt47sk8k6u7l0inkhd5p3j76kd@4ax.com> |
On 13 Aug 2016 23:25:20 GMT, ram@zedat.fu-berlin.de (Stefan Ram) wrote: > »a == b« and »a.equals( b )« have two different meanings > in Java. Fairly enough, they are written in different > ways in Java. Some Forth philosophy here. They pronounce words in a special way. They got into the habit since so many methods/operators contain punctuation. e.g. ! is pronounced "store". @ is pronounced "fetch" Some possible conventions: == very equals == equalsequals == same == identical
[toc] | [next] | [standalone]
| From | Gene Wirchenko <genew@telus.net> |
|---|---|
| Date | 2016-08-18 09:42 -0700 |
| Message-ID | <g9pbrbtqqe9brfkq8bqhlm6qll8fgi788l@4ax.com> |
| In reply to | #35391 |
On Thu, 18 Aug 2016 06:45:26 -0700, Roedy Green <inquiry@mindprod.com>
wrote:
>On 13 Aug 2016 23:25:20 GMT, ram@zedat.fu-berlin.de (Stefan Ram)
>wrote:
>
>> »a == b« and »a.equals( b )« have two different meanings
>> in Java. Fairly enough, they are written in different
>> ways in Java.
>
>Some Forth philosophy here. They pronounce words in a special way.
>They got into the habit since so many methods/operators contain
>punctuation.
>
>e.g. ! is pronounced "store". @ is pronounced "fetch"
>
>Some possible conventions:
>
>== very equals
>== equalsequals
>== same
>== identical
In PHP, == is not identical; that would be ===. I got bit on
this on a uni assignment.
Now, imagine these special pronunciations with multiple
definitions getting around.
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-08-18 22:05 -0400 |
| Message-ID | <np5pho$kvq$1@gioia.aioe.org> |
| In reply to | #35393 |
On 8/18/2016 12:42 PM, Gene Wirchenko wrote: > On Thu, 18 Aug 2016 06:45:26 -0700, Roedy Green <inquiry@mindprod.com> > wrote: >> On 13 Aug 2016 23:25:20 GMT, ram@zedat.fu-berlin.de (Stefan Ram) >> wrote: >> >>> »a == b« and »a.equals( b )« have two different meanings >>> in Java. Fairly enough, they are written in different >>> ways in Java. >> >> Some Forth philosophy here. They pronounce words in a special way. >> They got into the habit since so many methods/operators contain >> punctuation. >> >> e.g. ! is pronounced "store". @ is pronounced "fetch" >> >> Some possible conventions: >> >> == very equals >> == equalsequals >> == same >> == identical > > In PHP, == is not identical; that would be ===. I got bit on > this on a uni assignment. PHP object1==object2 is Java object1.equals(object2), but the PHP class can not override the functionality it is always all fields PHP object1===object2 is Java object1==object2 PHP simple1===simple2 is Java simple1==simple2 PHP simple1==simple2 does not have a Java equivalent as PHP is doing various type conversions to see if it is logical the same Arne
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web