Post Reply 
RPL equivalents to BREAK, CYCLE, EXIT, etc.?
06-09-2014, 09:12 AM (This post was last modified: 06-09-2014 09:56 AM by HP67.)
Post: #16
RE: RPL equivalents to BREAK, CYCLE, EXIT, etc.?
Not to me, despite the technical correctness of your two points.

The first example used one fixed loop and one test. The counter-example used an indeterminate loop, an explicit counter variable, and two tests. That isn't simplicity nor clarity. Rather, I think Thomas motivated BREAK very well with his example. That is how it would be coded in any number of languages that don't impose a particular paradigm on the coder. The first version is simpler, clearer, more efficient, and less error-prone. The second version trades away clarity for a theoretical view of correctness that is not connected to an actual implementation. And the loop in the second example is actually a fixed-count loop in the degenerate case anyway, which weakens the argument that a definite loop structure is not appropriate.

It ain't OVER 'till it's 2 PICK
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: RPL equivalents to BREAK, CYCLE, EXIT, etc.? - HP67 - 06-09-2014 09:12 AM



User(s) browsing this thread: 2 Guest(s)