Re: "no variable or argument declarations are necessary."
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: "no variable or argument declarations are necessary."

From: Steve Holden <steve@holdenweb.com>
Date: Fri Oct 07 2005 - 14:56:14 CEST

Christophe wrote:
> Fredrik Lundh a écrit :
>
>>"Christophe" wrote:
>>
>>
>>
>>>It's more of a "Nearly too late" type checking I would say. Not that I
>>>complain but it would be great if there were also some automatic type
>>>checking to catch a few errors as soon as possible.
>>
>>
>>use assert as the soonest possible point. implementing "type gates" is
>>trivial, if you think you need them.
>
>
> Still, it would be great if there were also some automatic type checking
> in place. Using assert is hardly automatic and non intrusive.
>
> I mean, why not ? Why does the compiler let me do that when you know
> perfectly that that code is incorrect :
> def f():
> return "a" + 5
>
> Of course the system can't be perfect but it doesn't need to be. It
> doesn't need to constrain us in any way but if it can detect some errors
> early, then it is worth it.

While this is a perfectly acceptable feature request, we should remember
that Python is developed and maintained by a volunteer team. Do we
*really* want them spending their time adding "features" like this?

regards
  Steve

-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                  www.python.org/pycon/
Received on Sat Oct 15 04:15:40 2005