Re: Searching a motivating example for upcasts
ram@zedat.fu-berlin.de (Stefan Ram) writes:
.---------------------------------------------------------.
| So I am looking for any real world examples where it is |
| advantageous to limit voluntarily the possibilities of |
| some object in order to make sure that one uses a |
| general procedure on it. |
'---------------------------------------------------------'
Thanks for all the answers! But I have not yet heard an
example that to me seems to be adapted better than the one I
usually use:
In the Federal Republic of Germany, there are cars with
a manual gearbox and cars with an automatic gearbox.
When someone undergoes a driving test using an automatic
gearbox, he will not be allowed to drive a car with a
manual gearbox later.
One assumes that a driver who learned to drive with a
manual gearbox can also drive with an automatic gearbox,
but /not/ vice versa.
So for someone who wants to obtain a permission to drive
cars with /any kind of gearbox/,
.----------------------------------------------------------.
| the additional feature of the automatic gearbox will be |
| intentionally turned off? during the driving test, to |
| make sure that the examinee will be able to drive any |
| kind of gearbox. |
'----------------------------------------------------------'
?) Or, - equivalently - he will drive a car without
an automatic gearbox.