Thanks for all these responses. I think I will play around with rebol more
so I can understand it better. This module! datatype sounds really
interesting. I'd be interesting in reading the post Carl made on this that
was supposidly posted some time back. I'd also be curious to know why rebol
can't be compiled. Javascript, perl, python, java ... and most all languages
i've seen can all be compiled (to at least byte code)...
thanks
Rishi O.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 10, 2000 3:50 AM
Subject: [REBOL] Re: rebol weak points (i think)
> Hello [EMAIL PROTECTED]!
>
> On 09-Set-00, you wrote:
>
> r> I've just started to play around with rebol. It definately has
> r> it's = advantages for the beginner progammer but it seems
> r> shows some weakness = for advanced, modular based programming.
> r> For example, all user/system = defined variables are either
> r> global (or local to a function). Since all = variables are
> r> global in rebol and there is no way to associate a = variable
> r> with a class, this would probably lead to collisions when you
> r> = are using lot's of scripts.=20
>
> Actually, this is not true. You can create as many contexts as you
> like; think of a context as a "namespace", if you prefer. Also,
> you should also realize that REBOL has no variables at all, but
> only values.
>
> Furthermore, the new upcoming MODULE! datatype will make REBOL
> much more powerful that any other language with regards to
> modularity.
>
> r> Or let's say that the programmer of a utility script
> r> reimplemented a = rebol defined function such as "print." Now
> r> when you add his utility = script to your script, the function
> r> print get's all screwed up in either = your script or his
> r> script.=20
>
> Have a look at:
>
> my-object: make object! [
> print: func ["my print" val] [
> system/words/print val ; for example
> ]
> ]
>
> r> Java and javascript have a much less chance of these
> r> collisions since = the programmer can create static variable
> r> and functions that are = associated with a class. These vars
> r> and functions can be accessed = globally, but must have the
> r> name of the class in front of the variable. = for example,
>
> r> Math.pi=20
>
> math: make object! [
> pi: 3.1415926535 ;...
> ]
>
> math/pi
>
> r> could be a variable pi defined in class Math that can be
> r> accessed = globally.it is not an instance variable, it is a
> r> static variable. = Outside of the class Math, you have to use
> r> "Math" before it in order to = access it.
>
> It can be made "static", too, if you need to. For example, with:
>
> math-statics: context [ ; the CONTEXT function is present in the
> ; latest experimental releases.
> values: [3.1425926535] ; etc.
> set 'math context [
> pi: does [values/1]
> ]
> ]
>
> math1: make math []
> math1/pi
>
> Regards,
> Gabriele.
> --
> Gabriele Santilli <[EMAIL PROTECTED]> - Amigan - REBOL programmer
> Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/
>