[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LOGO-L> Re: more thoughts on punctuation



Add this to the library


TO  setvariable :l
if  listp :l [foreach  :l [makevariable ?] stop]
if or definedp :l primitivep :l [(pr :l [allready defined]) stop] 
define :l list []( list "output "thing word ""  :l)
define word  "set  :l   list [&] (list "make word "" :l  ":&) 
END

And everybody should be happy.


setvariable will declare the variables unsing setter and working with colonless variables.


setvariable [a b c]
seta 4
setb 5

pr a + b
9
setc a + b
pr c
9

seta like setheading
pr a like pr heading

setvariable is just  the way defining personalized setter.

The very strong idea of the pair of command /function

setfoo foo is preserved and extended.



There is an other way too, going closer to object programming.

Using name as.
foo.get
foo.set

The general writing 

<object>.<action>

As exemple

bitmap.copy
bitmap.paste
bitmap.load

In Mswlogo we could have

button.create
button.update
button.delete

Tha is the way I have translated  logo in french.

Just writing that I remark that than I have:

combobox.string
combobox.setstring

using the pair in objetct

So your right we have to use the pair seta and a
and not 

a.set
a.get

Thank for the historicals examples of syntax.

I never meet a logo user that say to me
to foo :a :b :c  is not correct and should be
to "foo "a "b "c

to foo allows beginners to make procedures easily.

Then after we can tell them that's not correct but good for beginners. They change
there representation of the things  understanding what should be done and just continue
to use it as before knowing it is not correct but usefull. That is for me constructivism.


 For the beginners the editor is another country and they don't wonder that there
the life is differrent.

The colon just representing sybolically the variable and not the value of the variable
or the short cut for thing "voo
P-A Dreyfuss  

This was answer to :

>Please reply to bh@anarres.CS.Berkeley.EDU (Brian Harvey)  or 
>logo-l@gsn.org   NOT   logo-list@gsn.org  or  me.
> 
>                        -John-
>--Message below re-posted by <jstclair@omsd.cerf.fred.org>
>Date - 23 Mar 1998 18:44:18 GMT
>From - bh@anarres.CS.Berkeley.EDU (Brian Harvey)
>To - jcstclair@omsd
>Subject - Re: more thoughts on punctuation
>Usenet: comp.lang.logo
>------------------
>Post Usenet mail to comp-lang-logo@ucbvax.berkeley.edu
>------------------
>
>Fred Gilham <gilham@snapdragon.csl.sri.com> writes:
>>Perhaps someone can explain the motivation for using :foo instead of
>>"foo as the variable designator in procedure defintions.
>
>In earlier versions of Logo, there were many more syntactic special cases
>than there are now.  Until pretty recently, many Logo dialects had
>	IF :X=3 THEN PRINT "YES ELSE PRINT "NO
>and the old MIT PDP-11 Logo even had
>	PRINT :X MAKE "X :X-1 UNTIL :X=0
>for what in Berkeley Logo would be
>	do.until [print :x make "x :x-1] [:x=0]
>
>Even earlier than that, in the first BBN Logo spec, MAKE took no
>inputs.  You typed MAKE on a line by itself, and then it prompted
>you for a variable name (which you didn't have to quote), and then
>it prompted you for the new value.  It was interactive in the same
>sense in which TO is interactive now.
>
>So in those days people thought nothing of saying "colons will remind
>people that these are names of variables"; there was no uniform evaluation
>model to protect.
>
>TO is the only holdover of special forms in modern Logo (except for
>the obscure .MAYBEOUTPUT special form in Berkeley Logo!), but some
>modern Logos are moving away from colons by providing getter/setter
>procedures instead of variables.  That's why we're having this
>discussion:  Should Berkeley Logo follow their lead?
>
>--------------------
>
>Of course there is no real need for me to do anything.  People who
>are desperate for coloness variables can define their own getter/setter
>procedures.
>
>TO FOO
>OUTPUT :FOO
>END
>
>TO SETFOO :VAL
>MAKE "FOO :VAL
>END
>
>But my perception is that most of the anti-colon sentiment is from
>teachers who are NOT programming language enthusiasts, have only
>recently learned Logo themselves, have no model of evaluation in
>their heads, but are nevertheless teaching kids stuff using Logo,
>generally an LCSI one.  So telling them to build their own tools
>probably misses the point.
>
>(Except that another possible point would be that we should tell
>those teachers to study Logo in more depth.  But is that helpful,
>or just arrogant?)
>                                                 
>
>
>
>



Free web-based email, Forever, From anywhere!
http://www.mailexcite.com
---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org.  Mail
questions about the list administration to logofdn@gsn.org.  To
unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home