Re: "no variable or argument declarations are necessary."
- From: Antoon Pardon <apardon@xxxxxxxxxxxxxxx>
- Date: 4 Oct 2005 12:35:06 GMT
Op 2005-10-04, Steve Holden schreef <steve@xxxxxxxxxxxxx>:
> Paul Rubin wrote:
>> Antoon Pardon <apardon@xxxxxxxxxxxxxxx> writes:
>>
>>>>Or you just code without declaring, intending to go
>>>>back and do it later, and invariably forget.
>>>
>>>What's the problem, the compilor will allert you
>>>to your forgetfullness and you can then correct
>>>them all at once.
>>
>>
>> Thiat in fact happens to me all the time and is an annoying aspect of
>> Python. If I forget to declare several variables in C, the compiler
>> gives me several warning messages and I fix them in one edit. If I
>> forget to initialize several variables in Python, I need a separate
>> test-edit cycle to hit the runtime error for each one.
>
> Well I hope you aren't suggesting that declaring variables makes it
> impossible to forget to initalise them. So I don;t really see the
> relevance of this remark, since you simply add an extra run to fix up
> the "forgot to declare" problem. After that you get precisely one
> runtime error per "forgot to initialize".
Declaration and initialisation often go together. So the fixup
to declare is often enough a fixup for the initialisation too.
--
Antoon Pardon
.
- Follow-Ups:
- Re: "no variable or argument declarations are necessary."
- From: Brian Quinlan
- Re: "no variable or argument declarations are necessary."
- References:
- "no variable or argument declarations are necessary."
- From: James A . Donald
- Re: "no variable or argument declarations are necessary."
- From: Jean-François Doyon
- Re: "no variable or argument declarations are necessary."
- From: James A . Donald
- Re: "no variable or argument declarations are necessary."
- From: Michael
- Re: "no variable or argument declarations are necessary."
- From: George Sakkis
- Re: "no variable or argument declarations are necessary."
- From: Antoon Pardon
- Re: "no variable or argument declarations are necessary."
- From: Steven D'Aprano
- Re: "no variable or argument declarations are necessary."
- From: Antoon Pardon
- Re: "no variable or argument declarations are necessary."
- From: Paul Rubin
- Re: "no variable or argument declarations are necessary."
- From: Steve Holden
- "no variable or argument declarations are necessary."
- Prev by Date: Re: Dynamical loading of modules
- Next by Date: Re: Python profiler
- Previous by thread: Re: "no variable or argument declarations are necessary."
- Next by thread: Re: "no variable or argument declarations are necessary."
- Index(es):
Relevant Pages
|