Object Rexx vs Rexx 
Author Message
 Object Rexx vs Rexx

Hi,

I saw that there is two version fo REXX in Warp 4 and I would like to know the
difference between the two. I am use to the ?original? REXX but I know nothing
of Obejct Rexx

Thank you in advance

Merci a l'avance

Martin



Wed, 14 Apr 1999 03:00:00 GMT  
 Object Rexx vs Rexx


Quote:
>Hi,

>I saw that there is two version fo REXX in Warp 4 and I would like to know the
>difference between the two. I am use to the ?original? REXX but I know nothing
>of Obejct Rexx

Rexx programs with Object Rexx
------------------------------

Object Rexx first adds some new functions (e.g. CHANGESTR(), COUNTSTR()) and new
SysUtility-Functions (e.g. macro-space functions) in RexxUtil.

It is backwardly compatible to (classic) Rexx, so your Rexx programs should
continue to run unaltered. Once you switch to Object Rexx you may look-up the
online manual and look at the migration information section by entering

        view rexx migration considerations

in a commandline window.

Of course you may continue to develop and enhance Rexx programs the usual
("classic") way, meaning, that you need not use the OO-functionality of Object
Rexx at all.

Object Rexx - new concepts
--------------------------

Object Rexx introduces the OO-concepts found in OO-languages like Smalltalk,
C++, Java, etc.  It does so in a very powerful, effective, yet simple to use
way.

You are able define (public/private) classes, class methods and instance
methods (methods may be public/private, guarded/unguarded, attribute methods
allowing for interacting with object variables directly via messages).  

A class determines the abilities of its instances ("object", "instance"), which
are easily created, usually by sending the class the message "new".  The
returned objects are stored in variables (actually the reference to that newly
created object).

If you want to activate a method on a specific object you send it the name of
the desired message with the message-operator "~" (a tilde, called "TWIDLLE" in
Object Rexx).  If you need to supply arguments you do so by supplying them in
parenthesis immediately following the message name (as if it was a function
call).  A method - like a function - can return a result, if it was designed to
do so.  (If you wish, you may regard a method merely as a function defined for a
specific class.  To invoke a method you need to send its name to the appropriate
object; this way methods are able to store state-data separately for each single
instance of a class; "object" and "instance" are synonyms BTW.)

Object Rexx supplies a standard set of prefabricated classes, which one can
immediately use (collection classes like set, bag, list, table, relation, or
interesting ones like monitor and the like).  It is even possible to create
full-fledged classes dynamically at run-time.

Other features include e.g.  multiple-inheritance (even at run-time on the fly),
(instantiable) parametrized modules, functions accessible from other programs
(denoted with the ROUTINE-directive), direct interactibility with SOM and DSOM,
as well as direct interfacing with OS/2's OO workplace shell, even allowing for
creating one own workplace-shell-classes WRITTEN *in Object Rexx* !

SOM/DSOM support allows Object Rexx programmers to use any SOM and DSOM
(distributed SOM, even over networks to DSOM-objects residing on non-Intel
hardware and different operating systems like AIX, MVS, Windows etc.!)  class
directly (from a programmer's point of view interacting with those classes is as
simple as interacting with native Object Rexx classes, e.g.  one sends Object
Rexx messages to them).  The interesting thing here is, that due to D/SOM design
those D/SOM classes may be written in *any* language (e.g.  C, C++, COBOL,
etc.), yet Object Rexx can interact with them as if they were written in Object
Rexx.  SOM/DSOM support is just one of the incredible powerful and newly
introduced features into Object Rexx.

One extremely nice (important) feature of Object Rexx:  it allows for *multiple
threads of execution* ("multithreading"), meaning that any number of methods may
be running concurrently with each other at any given time.

Of course, there is more to say; in short:  Object Rexx introduces very powerful
concepts in a way, which made Rexx so popular:  the usage is simple and
efficient (you can even interact with the workplace shell in a "live session"
from rexxtry, sending it messages like creating/moving/deleting folders or their
contents etc.; this BTW shows impressively that OS/2's workplace shell is not a
nice painting of icons, but a world of "living objects" which react on messages
sent to them).

IMHO, Object Rexx in relation to other OO-programming-languages (e.g.  C++) is
comparable to classic Rexx to procedural-programming-languages (e.g.  C):  easy
to learn, easy to code, easy to maintain, yet *very* powerful.

The only "drawback": its OO-concept. :-)
[It takes (sometimes a lot of) time and effort for truly switching from a
procedural to an OO-thinking in programming.  But once this step was
successfully undertaken, it will pay off and you will find that Object Rexx is
really very easy to get acquainted to and taking advantage of it.]

---rony



Tue, 20 Apr 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Classic Rexx vs. Object Rexx

2. VX-REXX vs. Object Rexx

3. Object REXX vs. Classic REXX

4. Vispro Rexx vs VX - Rexx

5. VisPro/Rexx vs VX-REXX

6. mainframe rexx vs. os/2 rexx

7. PRO-REXX vs REXX/370 (VM/CMS)

8. PRO-REXX vs REXX/370 (VM/CMS)

9. Vispro Rexx vs VX - Rexx

10. VisPro REXX vs VX-REXX

11. VisPro REXX vs VX-REXX

12. Personal REXX vs Enterprise Rexx

 

 
Powered by phpBB® Forum Software