🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.logo
Article #247

Re: um, maybe this is a silly question

#247
From: Isaac Rabinovitch
Date: Sun, 11 Oct 1992 19:21
44 lines
2448 bytes
Hey Ocie, that wasn't such a silly question after all!

In <1b44g5INNqq1@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU (Brian Harvey) writes:

>The answer
>		make "x 12
>is correct but really only answers part of the question.

>In languages like BASIC and C, there is a heavy emphasis on the style of
>programming in which instructions are executed in sequence, and most of
>those instructions change the values of variables.  (In BASIC this is
>because the language is not capable of any alternative; in C, it's because
>the can't-teach-an-old-dog programmers aren't.)

>In Logo it's not very common to use MAKE at all, or to change the value
>of a variable in any other way.  Instead, Logo emphasizes functional
>programming, in which the computation progresses when a function calls
>another function.  (The function can call itself; that's recursion, which
>Logo uses instead of conventional looping structures like WHILE.)

>Example: Euclid's GCD algorithm, both ways:
>.....

This raises two questions:  First, Why does your book (*Computer Science 
Logo Style*) spend so much time on make and on "instruction sequence"
programs?  Second, how do you justify the abolition of assignment and
iteration to someone who is used to using them?  I don't mean the
fancy doctrines about denotational elegance and all that.  Few
programmers are interested in that stuff, assuming they can understand
it.  What are the *practical* advantages?

Incidentally, you probably should make it clear that you're talking
about a specific kind of recursion, namely tail recursion.  Most C
programmers will look at your Euclid's example, scratch their heads,
and say, "Gee, that's OK if you can set aside a meg for the stack.
These list guys sure don't know how to program in the real world...."
-- 

	ergo@netcom.com 			Isaac Rabinovitch
        {apple,amdahl,claris}!netcom!ergo	Santa Cruz, CA
	
	You will be assimilated.  Resistance is futile.
		
Technical Details
Message-ID: <1992Oct11.192128.5448@netcom.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!amdahl!rtech!decwrl!csus.edu!netcom.com!ergo
References: <1992Oct9.065708.25074@muddcs.claremont.edu> <1992Oct9.123626.15852@cbfsb.cb.att.com> <1b44g5INNqq1@agate.berkeley.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!amdahl!rtech!decwrl!csus.edu!netcom.com!ergo
From: ergo@netcom.com (Isaac Rabinovitch)
Newsgroups: comp.lang.logo
Subject: Re: um, maybe this is a silly question
Message-ID: <1992Oct11.192128.5448@netcom.com>
Date: 11 Oct 92 19:21:28 GMT
References: <1992Oct9.065708.25074@muddcs.claremont.edu> <1992Oct9.123626.15852@cbfsb.cb.att.com> <1b44g5INNqq1@agate.berkeley.edu>
Distribution: usa
Organization: UESPA
Lines: 44