Re: Py3K idea: why not drop the colon?
- From: "Dan Lenski" <dlenski@xxxxxxxxx>
- Date: 14 Nov 2006 07:17:20 -0800
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
.
- Follow-Ups:
- Re: Py3K idea: why not drop the colon?
- From: Hendrik van Rooyen
- Re: Py3K idea: why not drop the colon?
- References:
- How to choose the right GUI toolkit ?
- From: Dan Lenski
- Re: Py3K idea: why not drop the colon?
- From: Hendrik van Rooyen
- How to choose the right GUI toolkit ?
- Prev by Date: Re: modules and generated code
- Next by Date: Noob | datetime question
- Previous by thread: Re: Py3K idea: why not drop the colon?
- Next by thread: Re: Py3K idea: why not drop the colon?
- Index(es):
Relevant Pages
|