Article View: alt.folklore.computers
Article #623705Re: The birth of BASIC
From: Joe Pfeiffer
Date: Mon, 04 Jun 2018 19:05
Date: Mon, 04 Jun 2018 19:05
64 lines
5234 bytes
5234 bytes
Charlie Gibbs <cgibbs@kltpzyxm.invalid> writes: > On 2018-06-04, Gareth's Downstairs Computer > <headstone255.but.n...@yahoo.com> wrote: > >> On 04/06/2018 12:13, Bob Eager wrote: >> >>> On Mon, 04 Jun 2018 06:28:37 -0400, Peter Flass wrote: >>> >>>> Gareth's Downstairs Computer >>>> <headstone255.but.n...@yahoo.com> wrote: >>>> >>>>> On 03/06/2018 22:40, Peter Flass wrote: >>>>>> >>>>>> Some problems are easily solved by recursion that are significantly >>>>>> more complicated otherwise. >>>>> >>>>> I would be interested to know some examples, please? >>>> >>>> Depth-first search of a binary tree. Top-down parsing. >>>> >>>> Anything that requires retracing a path thru a data structure. Without >>>> recursion you have to maintain a table to keep track of where you've >>>> been and where you're going. Recursion just handles it naturally. >>> >>> +1 >> >> In both cases a table is maintained, either through a manually >> programmed (trivial) table or through the auto-maintained call >> tree, either by a return stack, or, again, in the case of >> languages such as PL/M-86 that allocate local data statically, >> a human-maintained call structure. >> >> It seems to me that computer scientists wish for everything to >> be handed to them on a plate and baulk at the thought of >> minor diversions to provide some simple and trivial extra facitlites >> whereas real world programmers just get on with the job. > > I admit that there are probably cases where recursion is an > elegant solution to the problem. However, in my experience > such cases are few and far between. I've always considered > an obsession with recursion to be a hallmark of the CS weenie. Speaking as retired faculty, we tend to be better at giving the students tools than at showing them where they're appropriate... In the case of recursion, a problem a lot of new students have is understanding the difference between calling a function, and using a goto to get to the function and another goto to go back where you came from (I actually once had a student ask me what the difference was; he didn't have enough of a concept of abstraction, encapsulation, or organization for any answer in those terms to make the slightest sense). Simply not telling them about labels and gotos in the first class helps, but there's always one who figures it out on his own and turns in a bowl of amazing spaghetti for his second or third assignment. By the time they can get a simple recursive function to work, they have to have some sort of understanding of the notion of a function call being the same thing as turning a part of the problem over to somebody else to solve, and getting an answer back. So it's really helpful in teaching functions. Unfortunately, they also tend to come out of the experience with the idea that it's a great way to find the fibonacci sequence...
Technical Details
Message-ID:
<1bfu22cqz1.fsf@pfeifferfamily.net>Path:
mbox-mo1.pugleaf.net!d26-v6ni505wmb.0!nntp.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!nntpfeed.proxad.net!news.muarf.org!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mailReferences:
<874lisvjda.fsf@usenet.ankman.de> <fnammmFl3d5U4@mid.individual.net> <pep9gi$ssu$1@dont-email.me> <877enj7cme.fsf@usenet.ankman.de> <2111hdh5qbjo4o6ot3n9cuqfgk1pqdn8ck@4ax.com> <86ad7a17-fbd3-4056-98aa-91e1b38932ce@googlegroups.com> <1778842547.549582573.514335.peter_flass-yahoo.com@news.eternal-september.org> <-8-dnaDqYe0JXo_GnZ2dnUU78bmdnZ2d@giganews.com> <68034291-0143-4693-b8fe-755df7f87322@googlegroups.com> <PcqdnYC22cafaI7GnZ2dnUU78S3NnZ2d@giganews.com> <pf1188$q8f$3@dont-email.me> <358405364.549754306.026362.peter_flass-yahoo.com@news.eternal-september.org> <pf2rlv$kq0$1@dont-email.me> <1147666797.549800491.480189.peter_flass-yahoo.com@news.eternal-september.org> <fnkl60Fl3d5U10@mid.individual.net> <pf385t$mnk$1@dont-email.me> <pf3lbl02eqe@news4.newsguy.com>Show Full Headers
Complete Article Headers
X-Received: by 2002:a1c:c181:: with SMTP id r123-v6mr1918607wmf.2.1528139126689; Mon, 04 Jun 2018 12:05:26 -0700 (PDT) X-BeenThere: alt.folklore.computers@googlegroups.com Received: by 2002:adf:dd88:: with SMTP id x8-v6ls6153087wrl.9.gmail; Mon, 04 Jun 2018 12:05:25 -0700 (PDT) X-Received: by 2002:adf:9141:: with SMTP id j59-v6mr1669307wrj.3.1528139125933; Mon, 04 Jun 2018 12:05:25 -0700 (PDT) X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 78.192.65.63 Path: mbox-mo1.pugleaf.net!d26-v6ni505wmb.0!nntp.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!nntpfeed.proxad.net!news.muarf.org!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Joe Pfeiffer <pfei...@cs.nmsu.edu> Newsgroups: alt.folklore.computers Subject: Re: The birth of BASIC Date: Mon, 04 Jun 2018 13:05:22 -0600 Organization: A noiseless patient Spider Lines: 64 Message-ID: <1bfu22cqz1.fsf@pfeifferfamily.net> References: <874lisvjda.fsf@usenet.ankman.de> <fnammmFl3d5U4@mid.individual.net> <pep9gi$ssu$1@dont-email.me> <877enj7cme.fsf@usenet.ankman.de> <2111hdh5qbjo4o6ot3n9cuqfgk1pqdn8ck@4ax.com> <86ad7a17-fbd3-4056-98aa-91e1b38932ce@googlegroups.com> <1778842547.549582573.514335.peter_flass-yahoo.com@news.eternal-september.org> <-8-dnaDqYe0JXo_GnZ2dnUU78bmdnZ2d@giganews.com> <68034291-0143-4693-b8fe-755df7f87322@googlegroups.com> <PcqdnYC22cafaI7GnZ2dnUU78S3NnZ2d@giganews.com> <pf1188$q8f$3@dont-email.me> <358405364.549754306.026362.peter_flass-yahoo.com@news.eternal-september.org> <pf2rlv$kq0$1@dont-email.me> <1147666797.549800491.480189.peter_flass-yahoo.com@news.eternal-september.org> <fnkl60Fl3d5U10@mid.individual.net> <pf385t$mnk$1@dont-email.me> <pf3lbl02eqe@news4.newsguy.com> Mime-Version: 1.0 Injection-Info: reader02.eternal-september.org; posting-host="75e449f9bb33901e1c64b36a3eb0c764"; logging-data="6509"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX1+daWHRcTUNIBaFD+S4FxJBTGhmTqI3Mro=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cancel-Lock: sha1:mYdZ66QfGKtTKUQOWGVDK3MmMgQ= sha1:Y0INJwslpQWIPAfhM7AVTuzrGX4= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit