[Gllug] Perl, the dogs nadgers?

Nix nix at esperi.demon.co.uk
Sun Jul 15 18:40:25 UTC 2001


On Sun, 15 Jul 2001, David Freeman yowled:
>  --- Dean S Wilson <dean.wilson3 at virgin.net> wrote:
> ----- Original Message -----
>> PS Just to avoid the whole English as a coding language stuff:
>> Time flies like a arrow.
>> Fruit flies like a banana.

Yes, that's called `ambiguity'. English is full of it, and there's
nothing at all stopping programming languages from using it too.

(In general, they don't, because parsers that can handle
context-sensitive grammars are a total nightmare to write. I've written
one that does part of the job for the specific case of a very limited
subset of English, and it was horrible to do.)

> Time is an object which has the property of fly which is being
> inherited from the object arrow so they both operate in a similiar
> manner.

Really? So `time' isa arrow?

Whatever a `property' is, this makes no sense. `Fly' is not a property,
in one sentence it's a verb, in another it's a noun; the parse trees for
these sentences are quite different. You can't model them both with the
same code because they're completely different. The word `flies' in one
sentence is not like the word `flies' in the other in any way (apart
from spelling).

If you're saying that the property is inherited, then you're saying that
all things that fly are arrows. Er, no.

> Fruit has the property of fly which is being inherited from banana
> which is a sub class of fruit.

So now you're saying that all fruits are bananas?! (Or, if you mean the
property is inherited, that all flies are bananas. Again, no.)

I completely fail to understand what on *earth* you're driving at here.

> makes sense to me. Just all depends on how you look at it.

If you understand object orientation or elementary linguistics, you're
doing a really *good* job of hiding it. Read up on the Liskov
Substitutability Principle.

-- 
`I'm not sure whether libtool is an existence proof that you _can_
 write a shell script that handles its arguments correctly, or a
 demonstration that you may try but you are doomed to failure.'
                                                       -- Zack Weinberg


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list