rebol

How are words bound within a Rebol module?

半城伤御伤魂 提交于 2019-11-28 06:53:54
I understand that the module! type provides a better structure for protected namespaces than object! or the 'use function. How are words bound within the module—I notice some errors related to unbound words: REBOL [Type: 'module] set 'foo "Bar" Also, how does Rebol distinguish between a word local to the module ( 'foo ) and that of a system function ( 'set )? Minor update, shortly after: I see there's a switch that changes the method of binding: REBOL [Type: 'module Options: [isolate]] set 'foo "Bar" What does this do differently? What gotchas are there in using this method by default? OK,

Is there a overall explanation about definitional scoping in Rebol and Red

隐身守侯 提交于 2019-11-27 13:14:44
From the REBOL/Core Users Guide , and What is Red , I have learned that both Rebol and Red use definitional scoping . From the guide, I know it is a form of static scoping , "the scope of a variable is determined when its context is defined", and is also called runtime lexical scoping , and is a dynamic form of static scoping that depends on context definitions . I know in com-sci, there are two forms of scoping: lexical scoping (static scoping) and dynamic scoping. This definitional scoping confused me. So what is definitional scoping? Rebol actually does not have scoping at all. Let's take

Is there a overall explanation about definitional scoping in Rebol and Red

余生颓废 提交于 2019-11-26 16:16:02
问题 From the REBOL/Core Users Guide, and What is Red, I have learned that both Rebol and Red use definitional scoping . From the guide, I know it is a form of static scoping , "the scope of a variable is determined when its context is defined", and is also called runtime lexical scoping, and is a dynamic form of static scoping that depends on context definitions. I know in com-sci, there are two forms of scoping: lexical scoping (static scoping) and dynamic scoping. This definitional scoping