Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > How ask.age works ?
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
11 5th November 03:06
andreas micheler
External User
 
Posts: 1
Default How ask.age works ?



Brian Harvey schrieb:


Certainly. But I think it's better for use with multithreading,
because with dynamic scope you can make so easily name capture bugs,
when you run many different Logo programs at once.
With lexical scope those are almost as easy to avoid.

I also see now it's not very hard to convert between the two scopes,
with a bit of exercise. :-)

And for the really hard things I have DYNTO. :-D

Cheers,
Andreas
  Reply With Quote


 


12 5th November 03:09
lionel laske
External User
 
Posts: 1
Default How ask.age works ?



Thanks Brian for this lesson. I'm now have a better understanding of
match... I hope ;-).
By the way I found the bug in Liogo: it's not at all related to dynamic
scope, run command, recursive call, etc... it's just a stupid bug on an
array boundary. More precisely the "LOCAL" command with a list always forgot
the first member so in the sample:

to test
local [a b]
make "a 30 ; (***)
make "b 12
end

test
print :a ; (**)
print :b ; (*)

The line (*) throw an exception because "b" is considered like a global
variable without any value.
The line (**) print 30 because, due to my bug, Liogo forgot to declare "a"
as a local variable so the line (***) assign a value to the GLOBAL variable
"a".

to match at :sen
local [special.var special.pred special.buffer in.list]
...
end

The first variable in the LOCAL command is precisely "special.var" so of
course each MAKE "special.var <value> assign a global variable without
considering the variable scope. So each value replace the previous one.

I'm sorry Pavel, I'm sorry Andreas, dynamic scope has nothing to do with
this bug ;-)

Thanks again for your help Brian.

Lionel.
"Brian Harvey" <bh@cs.berkeley.edu> a écrit dans le message de news: e52qmf$1lik$1@agate.berkeley.edu...
  Reply With Quote
13 5th November 03:10
pavel boytchev
External User
 
Posts: 1
Default How ask.age works ?


The message below is being cross-posted from LogoForum.

Exactly. The combination of two things treated as almost incompatible by
the majority of people, could be just a waste of time, but it could also
bring up something new and unexpected


This can evolve into a new recursive debate: Is dynamic scope a feature
of Logo? Is lexically scoped Logo a Logo?

Pavel

LogoForum messages are archived at:
http://groups.yahoo.com/group/LogoForum
  Reply With Quote
14 5th November 03:10
pavel boytchev
External User
 
Posts: 1
Default How ask.age works ?


The message below is being cross-posted from LogoForum.

Oh, no, no. I don't vote for any specific name. I just said that I'd
prefer DYNATO, because I'd read DYNTO as ['dintu]

BTW if you plan to have objects, you can make procedures objects too (as
they are in Elica). Example:

to myproc ....
:
end
make "myproc.dynamicscope "true

or like "Die NATO"


Hm. I would try to avoid this - you introduce a new reserved word, and
now you are planning to add even more...

- Pavel

LogoForum messages are archived at:
http://groups.yahoo.com/group/LogoForum
  Reply With Quote
15 5th November 03:11
andreas micheler
External User
 
Posts: 1
Default How ask.age works ?


Pavel Boytchev schrieb:


Hm, woulnd't this slow down normal procedures?


Oh, I don't have a problem with introducing new reserved words ;-)
(although the users might).

Andreas
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666