Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Making my own control flow structure

by pdcawley (Hermit)
on Oct 10, 2006 at 07:23 UTC ( #577334=note: print w/replies, xml ) Need Help??


in reply to Re^2: Making my own control flow structure
in thread Making my own control flow structure

If you're writing a scripting language, then it's easy.

Just write your if keyword in such a way that when a condition is not true you walk the AST of the then block and dump it as 'Not doing this, that or the other because of condition1', or whatever you need.

But, more generally, this seems to be a barking mad thing to want to do. What are you going to do about nested ifs? Case statements? Loops? "None of these functions got executed because the loop terminated". If you continue down that road you could well end up with a situation where the audit information swamps the test output, which is in nobody's best interest. Any auditor worth their pay is going to be able to do a far better job of auditing by reading the code than they are by examining the entrails of a run trace.

How about "None of these functions got run, because nobody executed the script"?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://577334]
help
Chatterbox?
[erix]: Henry VIII has a lot to answer for :P
[LanX]: erix sure next time you miss a conference nearby we drop by ...
[LanX]: did you even go to the Dutch Perl Workshop in Utrecht?
[erix]: haha ok. I'm going to Glasgow though, and make a long road trip round the isles
[erix]: [Lanx} not the last time but the one before (there have been two)
[LanX]: when did you move to Utrecht, you used to live in a windmill on a dyke walking around in wooden shoes. ..
[LanX]: ... did you lie to me? OO
erix wouldn't mind a nice old windmill to live in... Mueller/Miller/ Molenaar

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2017-12-15 16:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (439 votes). Check out past polls.

    Notices?