Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^11: Perl Best Practices

by wazoox (Prior)
on Jul 20, 2005 at 17:17 UTC ( #476570=note: print w/replies, xml ) Need Help??


in reply to Re^10: Perl Best Practices
in thread Perl Best Practices

Note that the errors arise when the exception disrupts the sequencing of side effects. No side-effects (like state), no problems.

All right. But AFAIK only pure functional programming avoids side-effects, isn't it? ;) How reimplementing the exemple above with no side-effects (in Perl, Java, Python, C++...) is beyond me.

Replies are listed 'Best First'.
Re^12: Perl Best Practices
by Anonymous Monk on Jul 20, 2005 at 18:20 UTC
    Well, when you write your own code in a language like Perl or Java, you can always try to minimize and localize side-effects. That is, you can try to make most of your functions pure, reduce the need for looping by using higher order functions, doing I/O at the top levels, not willy-nilly in the bowels, etc. When it comes to libraries though, you're at the mercy of someone else. Them's the breaks.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://476570]
help
Chatterbox?
[Discipulus]: such tests are intended for modules, as far as i know

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2017-01-24 12:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (204 votes). Check out past polls.