View Single Post
Old 09-30-2009, 02:06 PM   #32
krischik
Addict
krischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheesekrischik can extract oil from cheese
 
krischik's Avatar
 
Posts: 334
Karma: 1234
Join Date: Jul 2009
Location: Hindelbank, Switzerland
Device: P990i, PRS 505
Exclamation Open Object Rexx

Quote:
Originally Posted by Valloric View Post
Anyone wanting to present their idea of what scripting language should be embedded needs to be able and willing to convince me and others why should that language be chosen over the rest.
Well, I have a go for an underdog then which would never get any clicks then: Rexx.

Rexx was designed for Text processing and embedding. And one interesting aspect of Rexx is that it should be teamed up with a domain specific language. In such a team Rexx would do control structures and variables while domain specific language would to the application specific work.

With the following example REXX + CMD would rename the files "Foo_1.bat" .. "Foo_10.bat to "Bar_0.cmd .. Bar_9.cmd:

Code:
do i=1 to 10
   REN "Foo_" || i || ".bat" "Bar_" || i - 1 || ".cmd" 
end
"REN" would be the domain specific command from CMD - the rest is Rexx - including the rest of the REN line.

The same with CMD.EXE alone would be quite painful.

Rexx has been used before for editor scripting in the EPM (Enhanced Programmers Editor) and LPEX (Live Parsing Extensible Editor) editors (both IBM) and I know from experience that Editor scripting with Rexx is very nice indeed - Scriptability as the main feature for power users (non Power users just used the GUI). I wrote ton's of scripts for all sorts of editing problems with both of them.

Rexx has a current ISO standard and several implementations. The most current implementation is Open Object Rexx which is available for the needed three platforms. The object model of OORexx is Smalltalk based - that's duck type for hype-word-junkies - and quite powerful.

Martin
krischik is offline   Reply With Quote