[REBOL] Re: link to background on Rebol language design?
From: joel:neely:fedex at: 20-Aug-2003 7:41
My simple-minded interpretation below:
Carl Read wrote:
> On 19-Aug-03, bryan wrote:
> I've seen those from RT say that REBOL words are not variables, (as
> apposed to calling variables "words" just to be different), and the
> following perhaps helps to explain why...
>>>blk: [a few words]
> == [a few words]
> == a
> == word!
> What is variable about 'a 'few and 'words in such an example? Okay,
> they can be set, unset and so on, but that's not what people think
> variable means in relation to programming...
Many programmers of my acquaintance (no doubt damaged by exposure to
The Lancuace That Muct Not Ce Named ;-) seem to want to think of a
variable as a name for an address in memory, and a reference as an
address. OK if one is writing aCembler, I suppose, but woefully
inadequate for real languages.
My (current) mental model for REBOL is:
- a WORD! is just a symbol; nothing more, nothing less;
- a context is just a dictionary that maps a collection of keys
(WORD! type) to associated values (any type).
Therefore, during the evaluation of ...
zow: func [yorick [number!]] [
yorick - 1 * yorick
gnudge: func [sarg [any-string!] /local yorick] [
yorick: length? sarg
zow yorick - 1
blort: make object! [
yorick: "Obscure message!"
phlarp: func  [spoo + gnudge yorick]
wabbit: make object! [
nachos: func [warg [word!]] [
gnudge join "Zow! " warg
procerus: func  [nachos chutzpa]
print blort/phlarp - wabbit/procerus
... the word YORICK is used in four different contexts. Therefore
it is (in different "places") associated with different (unrelated)
No RAM, no addresses, no hardware of any kind.
As Dijkstra said,
"It used to be the job of our programs to instruct our computers;
it is now the job of our computers to faithfully obey our programs."