|
|
|
Maybe this should be
delivered and not displayed: Ponder…
|
|
Hmm. Or perhaps displayed
and not delivered.
|
|
|
|
“One day an
Englishman, a Scotsman, and an Irishman walked into a pub together. They each
called for a dram of whiskey. Just as they were about to enjoy their
libations, three flies landed in each of their drinks, and became stuck
inside the glasses. The Englishman pushed his shot away in disgust. The
Scotsman fished the fly out of his glass, and continued drinking it, as if
nothing had happened. The Irishman, too, picked the fly out of his drink,
held it out over the glass, and started yelling, ‘SPIT IT OUT, SPIT IT OUT
YOU BASTARD!!!!’…”
|
|
|
|
Here’s something
like what I think I used here:
|
|
|
|
So I’m going to
begin by showing you some Java code I put together, based on a programming
dilemma drawn from a compelling real-world situation, inspired by the perhaps
apocryphal tale above, and thereby expose some of Java’s (perhaps somewhat
subtle) limitations. I feel it is important in general to illustrate
programming language design issues like the ones we’ll be discussing here.
using realistic, real-world examples.
|
|
|
|
This example, while
it may strike some as somewhat frivolous, will illustrate that opportunities
to use multidispatch are not limited to mixed mode arithmetic or visitor
pattern applications, but are all around us, potentially ubiquitous in fact,
and are present anywhere where additional contextual information might be
employed to refine a computational choice/decision…
|
|
|
|
|
|
|
|
|
|
|
|
|