Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #31636
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Robert Klemme <shortcutter@googlemail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: If java doesn't support operator overloading, how does String + concatenation work |
| Date | Thu, 30 Apr 2015 23:46:53 +0200 |
| Lines | 24 |
| Message-ID | <cqfm6fFfctoU1@mid.individual.net> (permalink) |
| References | <3eceaed0-2cfa-4fac-89d6-23445a670f84@googlegroups.com> <mhths3$c00$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net YYaAYTe7M8GrHoUMDppA1gi/ZaSzqBHsvz6byOLHwe/3Y4IpA= |
| Cancel-Lock | sha1:16yfEoBkfqA5jbScIRCgmfajWFo= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
| In-Reply-To | <mhths3$c00$1@dont-email.me> |
| Xref | csiph.com comp.lang.java.programmer:31636 |
Show key headers only | View raw
On 30.04.2015 17:32, Eric Sosman wrote: > (In a trivial sense, defining a new > class or interface extends the `==' and `!=' and `?:' operators to > apply to new reference types -- but that's a pretty weak "overload.") I am not sure I agree here: for == and != it would be sufficient to be defined on (Object, Object) - there is no need for an overloaded version for each type and in fact I could not find indication in the JLS that there are overloaded versions let alone overloaded versions of the reference equality operator with different semantics. With your argument each new type would create a ton of overloaded versions - for each combination of reference types that have an inheritance relationship. see JLS Java SE 8 15.21.3 http://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.21.3 Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
If java doesn't support operator overloading, how does String + concatenation work Ajay Paul <ajaykpaul@gmail.com> - 2015-04-30 07:10 -0700
Re: If java doesn't support operator overloading, how does String + concatenation work Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-04-30 11:32 -0400
Re: If java doesn't support operator overloading, how does String + concatenation work Robert Klemme <shortcutter@googlemail.com> - 2015-04-30 23:46 +0200
Re: If java doesn't support operator overloading, how does String + concatenation work v_borchert@despammed.com (Volker Borchert) - 2015-05-01 06:33 +0000
csiph-web