gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Nit


From: Andrew Suffield
Subject: Re: [Gnu-arch-users] Nit
Date: Wed, 22 Oct 2003 13:35:17 +0100
User-agent: Mutt/1.5.4i

On Wed, Oct 22, 2003 at 12:05:22AM -0700, Dustin Sallings wrote:
> 
> On Tuesday, Oct 21, 2003, at 23:13 US/Pacific, Andrew Suffield wrote:
> 
> >>    0.0: false
> >
> >This evaluates to the number 0, and is therefore false.
> >
> >>    "0": false
> >
> >This evaluates to the number 0, and is therefore false.
> >
> >>    "0.0": true (huh?)
> >
> >This evaluates to the string "0.0", which is not the number 0 or the
> >string "", and is therefore true.
> >
> >This is really trivial stuff. It's in chapter 1 of the camel. You
> >really should have known it, especially that last one (which is a
> >FAQ).
> 
>       TMTOF.  It's an inconsistency.

> Since perl has no number types,

Totally wrong. Fundamentally so, even. Perl has three primitive
numeric types (two integer, one floating) plus a bunch of interesting
things done using magic, several of which are distributed in the core.

> it's 
> unclear when stuff is considered what.

No, it simply isn't. Even a beginner should understand the difference
between numbers and strings in perl, and when they occur; it's more
from the first couple of chapters of the camel.

> >>>And nor was it intended to. The reason for its existance is pretty
> >>>obvious to me, since I've spent more than 30 seconds (nearly five
> >>>minutes, I'd estimate) thinking about how to go about making all the
> >>>primitives throw exceptions on error.
> >>
> >>    This is the part I don't get.  Why would it not be intended to do
> >>    what it's documented to do?
> >
> >Again, it is not documented as doing this.
> 
>       That's clearly a perspective thing.  ``replace functions with 
> equivalents which succeed or die.''

Only if you're a lunatic. These two statements:

"Replace functions with equivalents which succeed or die"

"Replace functions with equivalents which die on error"

are obviously not the same thing. Especially when you've just spent a
lot of time complaining about the difference.

I've read the Fatal documentation carefully, and it most definitely
describes what it does accurately and precisely, and not what you say.

> >>    This is another example about how I'm a bad perl programmer because
> >>    I don't know some secret knowledge and instead go by what's in the
> >>documentation.
> >
> >No single text will convey all the things you need to know about any
> >given subject. There are several good books about perl that will get
> >you started, notably including the camel.
> 
>       Surely the authoritative online documentation should be considered 
> trustworthy.  It makes no suggestion that it is not the appropriate 
> tool for the job.  It seems to do quite the opposite, to me.

It makes no suggestion about appropriateness at all, and it almost
certainly shouldn't.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'                          |
   `-             -><-          |

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]