Hendrik van Rooyen wrote:
> This is true - and it is actually also an intractable problem - if you look at
> what your daughter wrote, you get the feeling that you should be able to write
> an interpreter that can implement what she meant, because it is quite clear to
> you - until you try to write the specs...

Unfortunately natural language is completely riddled with ambiguities
about negation and conjunction.  It doesn't seem like a good idea for
programming languages to emulate these too closely, even if it does
make for more "natural" constructions.

For example:
"You must not go there." means "You are forbidden to go there."
"You do not have to go there." means "You are not required to go
there."
Similar negations of two English verbs with virtually identical meaning
makes quite a difference in the semantics of the complete sentence!

Likewise, double negation is perfectly equivalent to single negation in
many languages, including in some dialects of English:
"I ain't got time." means "I don't have time."
"I ain't got no time." means "I don't have time."

Another problem is that the English word "or" sometimes means
"inclusive or" and sometimes means "exclusive or":
"Do you have any brothers or sisters?" (inclusive or)
"You can carry on a briefcase or a backpack." (exclusive or)

I think part of learning to think like a computer is learning to stop
associating computer logic too strongly with the natural language
meanings of "and", "or", and "not".

Dan

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to