Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #34271
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: When to use dynamic binding over dynamic dispatch? |
| Date | Mon, 9 May 2016 00:39:56 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 35 |
| Message-ID | <ngp449$obq$1@dont-email.me> (permalink) |
| References | <ebf7e9a1-18b1-4d36-91ef-7dc93d0bf25a@googlegroups.com> <ngbitr$70c$1@gioia.aioe.org> <dp8if4Fqm9cU1@mid.individual.net> <ngnb33$1rif$1@gioia.aioe.org> <ngnctb$pp9$1@dont-email.me> <ngniup$8u0$1@gioia.aioe.org> <ngo87v$c68$1@dont-email.me> <ngovei$b6i$1@gioia.aioe.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Mon, 9 May 2016 04:36:25 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="2d081e2f7155c28005d4472f67c2f43d"; logging-data="24954"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/feR7reFpZkAkyA0duxo1f" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
| In-Reply-To | <ngovei$b6i$1@gioia.aioe.org> |
| Cancel-Lock | sha1:QmB9uLI24H+YS8EqpxFV02xhSzY= |
| Xref | csiph.com comp.lang.java.programmer:34271 |
Show key headers only | View raw
On 5/8/2016 11:16 PM, Arne Vajhøj wrote:
> On 5/8/2016 4:44 PM, Eric Sosman wrote:
>>[...]
>> Let's try another example, if you dislike my first one:
>>
>> class Worker implements Runnable {
>> @Override
>> public final void run() {}
>> }
>> [...]
> PS: I don't think the above will use virtual invocation - it will
> use interface invocation as Runnable is an interface. But
> I don't think that is particular relevant.
<facepalm> Oops! </facepalm>
You're right: The invocation mode is `interface', not `virtual'.
I should have stopped with my first example, and left well enough
alone.
To the wider issue, though: It seems you are unhappy because you
and Java have different notions of what "virtual" means. You wrote
earlier,
>>> virtual method = method that can be overridden
>>> final method = method that can not be overridden
... and while this might be a perfectly good definition, it is not
Java's definition. The choice, then, is up to you: Stick with your
definition and remain miserable, or reconcile yourself with Java's
and become joyous and carefree. :)
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
When to use dynamic binding over dynamic dispatch? cdalten@gmail.com - 2016-05-02 18:08 -0700
Re: When to use dynamic binding over dynamic dispatch? Sebastian <news@seyweiler.dyndns.org> - 2016-05-03 20:47 +0200
Re: When to use dynamic binding over dynamic dispatch? Lew <lewbloch@gmail.com> - 2016-05-03 12:14 -0700
Re: When to use dynamic binding over dynamic dispatch? Arne Vajhøj <arne@vajhoej.dk> - 2016-05-03 21:23 -0400
Re: When to use dynamic binding over dynamic dispatch? Martin Gregorie <martin@address-in-sig.invalid> - 2016-05-04 10:48 +0000
Re: When to use dynamic binding over dynamic dispatch? Robert Klemme <shortcutter@googlemail.com> - 2016-05-08 12:24 +0200
Re: When to use dynamic binding over dynamic dispatch? Arne Vajhøj <arne@vajhoej.dk> - 2016-05-08 08:23 -0400
Re: When to use dynamic binding over dynamic dispatch? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-08 08:57 -0400
Re: When to use dynamic binding over dynamic dispatch? Arne Vajhøj <arne@vajhoej.dk> - 2016-05-08 10:37 -0400
Re: When to use dynamic binding over dynamic dispatch? Robert Klemme <shortcutter@googlemail.com> - 2016-05-08 22:30 +0200
Re: When to use dynamic binding over dynamic dispatch? Arne Vajhøj <arne@vajhoej.dk> - 2016-05-08 23:08 -0400
Re: When to use dynamic binding over dynamic dispatch? Robert Klemme <shortcutter@googlemail.com> - 2016-05-09 08:16 +0200
Re: When to use dynamic binding over dynamic dispatch? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-08 16:44 -0400
Re: When to use dynamic binding over dynamic dispatch? Arne Vajhøj <arne@vajhoej.dk> - 2016-05-08 23:16 -0400
Re: When to use dynamic binding over dynamic dispatch? Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-05-09 00:39 -0400
csiph-web