Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^4: Perl oddities

by herveus (Parson)
on Mar 02, 2005 at 14:24 UTC ( #435833=note: print w/replies, xml ) Need Help??

in reply to Re^3: Perl oddities
in thread Perl oddities


My sense is that push/pop/shift/unshift are much more frequently used than the trig functions. On that basis, it makes Huffman sense to provide the convenience of the push, etc. functions while declining to provide a fuller set of trig functions.


Replies are listed 'Best First'.
Re^5: Perl oddities
by Anonymous Monk on Mar 02, 2005 at 15:04 UTC
    You can only explain that with "Huffman" if the save space of 'tan' actually allows you to do something else. Besides, for your reasoning to really work, you'd have to sacrifice one of sin or cos. The analogue would really be having 'splice', 'push' and 'unshift', but not 'pop' or 'shift'. ;-)

      To be more clear, the utility of push, et al. justifies their existence. I claim (without specific evidence) that the trig functions are, in general, used much less frequently, thus making their expansion a less productive use of energy.

        Whose energy? It's not that tan (and acos, and asin, and atan) isn't provided by the C math library.

        Guess what, a corner where C is more programmer friendly than Perl... Now, that's an oddity! ;-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://435833]
[Corion]: Once upon a time I had automatic tests for checking the synopsis, but I stopped doing that because the setup was too fragile on CPAN testers for extracting code from the SYNOPSIS.
[Corion]: Maybe I should move the extraction of the code from the SYNOPSIS section into the author tests, or something like that...
[choroba]: Corion Sounds reasonable
[Corion]: choroba: Yeah - I basically have the same for regenerating README and README.mkdown already, except that I do that in Makefile.PL, but I guess one or the other thing should somehow work ;)
[ambrus]: was this bug: https://rt.cpan. org/Public/Bug/ Display.html?id= 59814
[Corion]: ambrus: Oh - that one would be much harder to automate... The SYNOPSIS section should mostly be a runnable program IMO, but I write only small snippets in my documentation for single functions/methods, and creating the appropriate environment for ...
[Corion]: ... those in an automated fashion seems somewhat hard to me. Although it should do wonders for the test coverage ;)

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (10)
As of 2017-02-27 12:14 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (383 votes). Check out past polls.