Re: int/long unification hides bugs
From: kartik vaddadi (kartick_vaddadi_at_yahoo.com)
Date: 10/27/04
- Next message: kartik: "Re: int/long unification hides bugs"
- Previous message: kartik vaddadi: "Re: int/long unification hides bugs"
- Maybe in reply to: kartik: "int/long unification hides bugs"
- Next in thread: Sam Holden: "Re: int/long unification hides bugs"
- Reply: Sam Holden: "Re: int/long unification hides bugs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 26 Oct 2004 20:14:49 -0700 (PDT) To: Josiah Carlson <jcarlson@uci.edu>, python-list@python.org
--- Josiah Carlson <jcarlson@uci.edu> wrote:
>
> kartick_vaddadi@yahoo.com (kartik) wrote:
>
> > integers are used in different ways from strings.
> i may expect file
> > paths to be around 100 characters, and if i get a
> 500-character path,
> > i have no problem just because of the length. but
> if a person's age is
> > 500 where i expect it to be less than 100, then
> **definitely**
> > something's wrong.
>
> So *you* need to do bounds checking.
do you check every assignment for bounds? can you?
overflow errors catch bugs when you dont do the
checks.
> > as i look at my code, i rarely have an issue with
> string sizes, but if
> > an integer variable gets very large (say > 2**31
> or 2**63), it
> > generally reflects a bug in my code.
>
> And you should check that, and not rely on a
> misfeature and a mistake.
why do u want me to check something that the language
can do? for precisely this reason, i consider this not
to be a misfeature or a mistake.
> I don't rely on overflow errors. [...]
> I prefer to check my variables when I rely on them.
i never talked about *relying* on overflow errors to
ensure the correctness of code. it's only a mechanism
that catches bugs in some cases - & that's valuable.
-kartik
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
- Next message: kartik: "Re: int/long unification hides bugs"
- Previous message: kartik vaddadi: "Re: int/long unification hides bugs"
- Maybe in reply to: kartik: "int/long unification hides bugs"
- Next in thread: Sam Holden: "Re: int/long unification hides bugs"
- Reply: Sam Holden: "Re: int/long unification hides bugs"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|