Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] rebol weak points (i think) Re:

From: ptretter:charter at: 9-Sep-2000 15:10

This is a multi-part message in MIME format. ------=_NextPart_000_0004_01C01A70.269D0D60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit You might want to look at the definitions for "bind" and "use". Also, look at the /local refinement by doing HELP FUNCTION. Paul Tretter -----Original Message----- From: [rishi--picostar--com] [mailto:[rishi--picostar--com]] Sent: Saturday, September 09, 2000 2:41 PM To: [list--rebol--com] Subject: [REBOL] rebol weak points (i think) I've just started to play around with rebol. It definately has it's advantages for the beginner progammer but it seems shows some weakness for advanced, modular based programming. For example, all user/system defined variables are either global (or local to a function). Since all variables are global in rebol and there is no way to associate a variable with a class, this would probably lead to collisions when you are using lot's of scripts. imagine someone wrote a utility script with a bunch of reusable functions. Let's say you want to use those functions in your script. If the original script uses a global variable with the same name as a global var you used in your script, it would cause a collision. Or let's say that the programmer of a utility script reimplemented a rebol defined function such as "print." Now when you add his utility script to your script, the function print get's all screwed up in either your script or his script. Java and javascript have a much less chance of these collisions since the programmer can create static variable and functions that are associated with a class. These vars and functions can be accessed globally, but must have the name of the class in front of the variable. for example, Math.pi could be a variable pi defined in class Math that can be accessed globally.it is not an instance variable, it is a static variable. Outside of the class Math, you have to use "Math" before it in order to access it. Perhaps I haven't studied the language in enough detail yet, but wouldn't you all agree that this is a weakness in rebol? It doesn't seem that well suited for modular based programming as is. Maybe I'm missing something but I don't see why the author did it this way... Rishi ------=_NextPart_000_0004_01C01A70.269D0D60 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 5.50.4207.2601" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><SPAN class=317040920-09092000><FONT face=Arial color=#0000ff size=2>You might want to look at the definitions for "bind" and "use".&nbsp; Also, look at the /local refinement by doing HELP FUNCTION.&nbsp; </FONT></SPAN></DIV> <DIV><SPAN class=317040920-09092000><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV> <DIV><SPAN class=317040920-09092000><FONT face=Arial color=#0000ff size=2>Paul Tretter</FONT></SPAN></DIV> <BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"> <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> [rishi--picostar--com] [mailto:[rishi--picostar--com]]<BR><B>Sent:</B> Saturday, September 09, 2000 2:41 PM<BR><B>To:</B> [list--rebol--com]<BR><B>Subject:</B> [REBOL] rebol weak points (i think)<BR><BR></FONT></DIV> <DIV><FONT face=Arial size=2>I've just started to play around with rebol. It definately has it's =<BR>advantages for the beginner progammer but it seems shows some weakness =<BR>for advanced, modular based programming. For example, all user/system =<BR>defined variables are either global (or local to a function). Since all =<BR>variables are global in rebol and there is no way to associate a =<BR>variable with a class, this would probably lead to collisions when you =<BR>are using lot's of scripts.=20<BR><BR>imagine someone wrote a utility script with a bunch of reusable =<BR>functions. Let's say you want to use those functions in your script. If =<BR>the original script uses a global variable with the same name as a =<BR>global var you used in your script, it would cause a collision.=20<BR><BR>Or let's say that the programmer of a utility script reimplemented a =<BR>rebol defined function such as print. Now when you add his utility =<BR>script to your script, the function print get's all screwed up in either =<BR>your script or his script.=20<BR><BR>Java and javascript have a much less chance of these collisions since =<BR>the programmer can create static variable and functions that are =<BR>associated with a class. These vars and functions can be accessed =<BR>globally, but must have the name of the class in front of the variable. =<BR>for example,<BR><BR>Math.pi=20<BR><BR>could be a variable pi defined in class Math that can be accessed =<BR>globally.it is not an instance variable, it is a static variable. =<BR>Outside of the class Math, you have to use Math before it in order to =<BR>access it.<BR><BR>Perhaps I haven't studied the language in enough detail yet, but =<BR>wouldn't you all agree that this is a weakness in rebol? It doesn't seem =<BR>that well suited for modular based programming as is. Maybe I'm missing =<BR>something but I don't see why the author did it this way...<BR><BR>Rishi<BR><BR></FONT></DIV></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_0004_01C01A70.269D0D60--