[Oberon] Oberon-07, recursion and type extension

Lars noreply at z505.com
Mon Sep 5 11:48:01 CEST 2016


On Wed, July 27, 2016 3:26 pm, Paul Reed wrote:
>
> You've come across a nasty implementation issue - if you use CASE to
> temporarily change the type of a parameter, it will temporarily change
> the definition of the procedure too; so the recursive calls are


I've always wondered if recursion, is a trick, and overrated (i.e. lisp)
and should be avoided, or embraced. It is certainly powerful but creates,
I find, confusing code. Dijkstra was skeptical of recursion at times, and
proud of it at other times.

I for one don't find all the tricks up Haskell or Lisps sleeve when using
recursion to be more readable code, than say, non recursive code that
avoids recursion as if it is a nasty trick...

I'm wondering, if recursion is highly over rated and should be used in
moderation, rather than embracing it like in functional languages... Maybe
super intelligent humans (clever) can understand all sorts of recursive
mind games, but should bone simple dumb readable programs contain
recursion riddled throughout the code everywhere? Or should it be avoided
and used in moderation?

I don't mean to claim the original poster of this email thread was abusing
recursion and riddling it throughout his code, as it was only a small
example. Rather I wanted to start a small discussion of people's opinion
on recursion and why everyone thinks it is so great when in fact often it
seems like a clever trick. It is certainly a different way of thinking
about a problem, but for humans, with our brain size.. is it worth abusing
recursion? Functional languages do not consider it abuse, but should it be
considered abuse?


More information about the Oberon mailing list