Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Apparent Inconsistencies in Perl Function Naming

by merlyn (Sage)
on Nov 24, 2000 at 18:13 UTC ( [id://43218]=note: print w/replies, xml ) Need Help??


in reply to Apparent Inconsistencies in Perl Function Naming

One thing that Perl most definitely is not is "orthogonal": that every kind of thing has every kind of operation applicable to it. Perl is optimized for the tasks you will be performing most often.

Larry said in one presentation I saw him make (can't recall which one now) that orthogonality isn't even for the birds... you don't see a bird go from northwest to southeast by flying one square south then one square east then one square south... Birds take the direct route, and so does Perl. Perl has operations for the things you do, and they're convenient in the domain of the thing you're working on.

The length of an array has no operator name, by the way. It's the name of the array in a scalar context. Nearly every time I do that, I don't have to say scalar, because I'm already in a scalar context. And I never think of substr as a "slice" of a string. It's a substring.

Get your terminology straight, and Perl makes sense. Try to look for artificial order along an axis not present, and you'll be no better than the scientists who claim that the drains drain clockwise in the Northern Hemisphere.

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: Apparent Inconsistencies in Perl Function Naming

Replies are listed 'Best First'.
Re (tilly) 2: Apparent Inconsistencies in Perl Function Naming
by tilly (Archbishop) on Nov 24, 2000 at 19:57 UTC
    Scientists?

    I do not believe that scientists ever had anything to do with this particular myth.

    The basic facts about weather and spin that it is based on were widely known. In the northern hemisphere hurricanes blow counter-clockwise, in the southern clockwise. I do not remember when this was first discovered, but from fairly shortly afterwards on any competent sea captain had to know it because if they encountered high winds at sea it told them which way to turn to avoid the worst of the storm.

    Therefore any scientist should have known that the effect was too small to be measured, but many others - including sailors - knew that. But note that sailors knew the fact but did not really understand the principles. Mix that with an inclination to tall tales and...

    Incidentally I didn't remember or look up the correct direction. Rather I remembered that the East Coast sees the sun rise 3 hours before the West. So draw a mental globe and visualize what way you have to move to get that to happen. OK, from the North Pole the Earth turns counter-clockwise. Now the cause of hurricanes turning is that when air comes together towards the eye, that from the equator moves faster than that near the pole. So visualize that and the hurricane turns counter-clockwise. In the Southern hemisphere the faster air comes (viewed from the North Pole) from on top so visualize...it goes clockwise.

    Now if you want to blame scientists for a myth, you can blame some in the Victorian era (sorry I forget names) for the widespread belief that in the Middle Ages people believed that the Earth was flat. No. They believed that the Earth was round and even knew the diameter fairly accurately. Indeed the main argument against Columbus was not that he would fall of the edge, but that it was too far to China and he would starve. And he would have had he not encountered a small obstacle in the way... :-)

Re: (sidenote) Apparent Inconsistencies in Perl Function Naming
by el-moe (Scribe) on Nov 29, 2000 at 03:09 UTC
      I think that was my point. Facts as I know them:
      • There is a force that causes large bodies to take on a direction, like hurricanes and other weather systems, as you point out, called the Coriolis effect.
      • Some scientists (or maybe just backyard scientists) applied this to smaller items, and concluded that a bathtub drain would drain in a particular direction. I heard this repeatedly as a kid, from different sources. (I studied "popular science" way back when.)
      • When carefully examined, random perturbations in initial turbulence, friction, etc etc all far outweigh the Coriolis effect at the scale of the bathroom tub, so this effect could never have been seen.
      That's what I was talking about when I said "some scientists". It was those "backyard scientists".

      -- Randal L. Schwartz, Perl hacker

        Whenever drain direction it comes up I tell people my right shoe wears out faster than my left ;)

        Some people are so gullible...

        To get back on topic... Perl being intuitive... I can hardly believe how cool some of the things I come up with are to me. I am still a fool but I do things now that I never thought were possible. I have yet to generate any complaint about the language or the community.

        Prost,
        Moe

      If I were on an ocean liner, crossing the equator, how far from the equator would I start to notice a change in direction, if I flushed a toilet? Would there be a gradual slowing down of the direction and then at a specific point in time would it just kind of "glug" with no rotation? Also where would this change take place in miles? I take it from what you said that water drains the same way in both hemispheres...how is it that this doesn't change if in fact it doesn't? Reta, Maine, USA

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://43218]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-23 10:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found