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: Dustin Sallings
Subject: Re: [Gnu-arch-users] Nit
Date: Wed, 22 Oct 2003 00:05:22 -0700


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, it's unclear when stuff is considered what. "0.0" == 0 is true, and 0 is considered false, and 0.0 is considered false, but "0.0" is not considered false.

        How did we get way over here?

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.''

        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.

I think you mean "It takes work not to pass on exceptions from things
you call". It takes no work at all not to throw any of your own.

I'd have to think about that one. If you find yourself in a bad state, it can be a lot more difficult to avoid throwing an exception than to just throw one.

        Probably the #1 feature of java is the vast availability of good
libraries, though.

Funny how there's somebody willing to say that about every language,
and at least as many people stating the opposite as the reason why
they can't afford to use the language in question.

Saying that the best feature of a language is the amount of code written for it is different from saying it should be used because of this. Perl also has a very large library suite, but I'll grow tomatoes for food before trying to deal with a large perl project again.

Java is plagued with bad programmers, more so than most
languages. Only php, perl and C++ have comparable numbers of bad
programmers using them (and perl and C++ get out here because creating
libraries is moderately difficult, so the bad programmers don't do it
as much as they otherwise would). As a result it has a huge range of
lousy libraries.

        I will agree with this.  Popularity certainly has its consequences.

--
SPY                      My girlfriend asked me which one I like better.
pub  1024/3CAE01D5 1994/11/03 Dustin Sallings <address@hidden>
|    Key fingerprint =  87 02 57 08 02 D0 DA D6  C8 0F 3E 65 51 98 D8 BE
L_______________________ I hope the answer won't upset her. ____________





reply via email to

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