Profile

unixronin: Galen the technomage, from Babylon 5: Crusade (Default)
Unixronin

December 2012

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Expand Cut Tags

No cut tags
Friday, September 29th, 2006 10:55 pm

The question came up elsewhere of what's the most CPU-time-effective way in Perl to determine whether a scalar's value "looks like a number".  It led to the following thought:

In some languages, you can ask the question "Is this variable an INT?" and get a YES or NO answer.

There are others in which you can ask "Are you an INT?" and get the answer "No, I'm a pointer to CHAR."

And then there's Perl, which more or less answers, "Why, sure, honey, if that's your kink we can do that, no problem...."

Tags:
Saturday, September 30th, 2006 06:47 pm (UTC)
Yet another reason why perl is a write only language.
Sunday, October 1st, 2006 05:13 pm (UTC)
And of course python just looks at you nicely, with a slightly quizzical expression of "Why is someone as amazing as yourself even worried about such trivialities?" It then says, "Don't worry, let me take care of it for you. Would you like some coffee?"