A goto-like usage of a function

Mel Wilson mwilson at the-wire.com
Fri Jul 30 00:09:41 CEST 2004

In article <donn-E41903.13311929072004 at gnus01.u.washington.edu>,
Donn Cave <donn at u.washington.edu> wrote:
>In article <64ednb5vPfE7yJTcRVn-pw at powergate.ca>,
> Peter Hansen <peter at engcorp.com> wrote:
>> The acceptance test would probably be: if a mature programmer
>> in the language in question encountered a loop-done-as-recursion
>> in code from, say, a junior programmer, would she refactor it to
>> use a more conventional control structure (e.g. while, or for)
>> or would she not give it a second thought?
>Depends of course on the language, but there sure exist
>languages where "while" and "for" don't even exist (and
>hence are not conventional control structures.)  Haskell
>is the one I know.

   Ditto the conditional and macro expansion pseudo-ops in
many Macro-Assemblers.  Multics alm supported assembly-time
loops with the `dup` pseudo-op, but with most assemblers
I've seen, if you want repeated actions at assembly time,
recursive macros are what you use.

   These ideas show up in the darndest places.

        Regards.        Mel.

More information about the Python-list mailing list