O'Reilly on the Virtues of Rexx
gaijincory writes "O'Reilly's ONLamp has written an interesting article on the history and virtues of Rexx, the first widely used scripting language concocted 25 years ago. According to the review, 'Rexx employs decimal rather than binary arithmetic' and 'You don't need to declare or predefine your variables. Rexx automatically allocates them when you first refer to them.'
I'd be interested to hear about any success (or failure) implementation stories."
You don't need to declare or predefine your variables. Rexx automatically allocates them when you first refer to them.
Gah! No-strong-typing is *NOT* a feature!
>You don't need to declare or predefine your variables.
Isn't this a bad thing? You would never catch typos when using variables. I start using a variable named "myBigNumber" then the next day I mistakenly start using a "myBigNum" variable even though I mean the same thing.
The surprise isn't how often we make bad choices; the surprise is how seldom they defeat us.
Some olde ex-mainframe guys at work have some Rexx manuals and one guy wrote a small utilitiy in Rexx. (these were the same people that had extensions to vi (.exrc's) to make it work like their mainframe editors...uhm, get out of the past?)
So thats great and all, but why are you programming in a professional capacity in a language that no one can maintain? Thats worse than hacking code in perl and not "using strict"!
In the future, I would want to not be isolated from my friends in the Space Station.
Is anyone else uncomfortable with case insensitive languages? That was one of the things I'd hoped REXX would address when it came out as a replacement for EXEC, I've always thought aside from the confusion factor of ignoring case (ever lose a file in Windows because of this?), not distinguishing case throws away an entire semantic of elegance for creating better and more maintainable code.
No, actually you misplacing files because the case wasn't what you expected on an old Windows 3.x system was the result of using badly ported case-sensitive tools in a case-insensitive environment. (btw: Windows has always been case-insensitive and case-preserving in the NT codebase)
Case sensitivity is, frankly, not only useless but flat out stupid and a vast step backward as it doesn't match human readable languages or other human experience thus breaking the paradigm of programming language as translator between human intent and hardware inflexibility. It leads to huge numbers of easily avoidable errors, increased maintenance time and cost and increased overall development time while providing no benefit. Sure, it makes life a little easier for lazy compiler writers and it's habit in people who've never bothered to learn any languages not derived from C but the point of a programming language is to make things easier for the human and not the compiler. Read some code in PL/I or ALGOL or LISP or Smalltalk or SNOBOL or, for that matter, REXX and you may expand your idea of what a language can be.
Other signs of C-blinders are thinking that three-part loop constructs are a good thing, that curly braces are actually either ergonomic or intuitive or that semicolons are how you end sentences;
If you do declare variables then the compiler can perform validation that it otherwise can't and catch errors at compile time. It's a *good* thing.
Object Oriented Programming theory would disagree with you. While it's a "*good* thing" for the compiler writer it's a bad thing for the programmer. One of the four original tenets of OOP is that everything in an OOP system uses LATE BINDING so that the system can be flexible. It's only because Stroustrop couldn't get that working when he was writing his semi-OOP preprocessor to C (C++, perhaps you've heard of it) that this key part of OOP started getting ignored.
The world doesn't begin and end with what can be done easily in a C derivative language. Take a look at Smalltalk-72 to see what OOP was supposed to be.
I don't think Rexx had a lot to do with the failure of the Amiga or OS/2 in the marketplace. Curiously enough, both of them had their deeply loyal adherents, and perhaps REXX was one of the reasons.
I have to admit that as a general rule I perfer languages that don't force me to declare variables, especially for simple projects. Or perhaps I just get tired of hearing stilted, bureaucratic language like "best practices".
That being said, what's wrong with decimal arithmatic? It has the major advantage of eliminating the tiresome rounding errors that make doing financial calculations in (say) Perl so annoying.
I thought the examples showed a very interesting way of thinking. I probably won't learn or convert to REXX but I can see that it's a very forgiving environment, and I think that makes life more pleasant overall, especially for beginneers. I can see why it's popular in cultures where C and Perl didn't start with overwhelming advantages.
D
If you think using binary arithmetic is a "best practice" then I hope you don't write any code for use in financial applications, where it can really screw things up. Absolutely. But in my mind binary vs 'decimal' is pretty much the same. I think we're talking about binary/fixed point VS floating point arithmetic. And FP is definitely a curse on financial apps.
Aparrently REXX will call an OS command if it doen't recognise a keyword. So just plain including grep and uniq and so forth as if they were functions is allowed. How quaint! Just think of the hacks, if you misspell pront or writte or opne or some random thing, you could be running any random black-hat code and perhaps never even knowing.
Sorry, nostalgic folks. The state of the art has moved on, and not accidentally.
Not that I have anything against the idea of case insensitivity, but do you have any idea how messy case insensitivity gets when you go beyond US ASCII?
Not all human languages have case. Some languages have case, but it doesn't work the same for all characters.
It seems that Scheme may change to become case-sensitive; this is presumably to make allowing unicode in identifiers workable.
I've never seen any well-written code, in any language, that accessed the same identifiers using different cases (although in Lisp comments usually describe variables in upper case although they're used in lower case in code, but that's also the GNU coding standard for C, so it isn't strictly related to the treatment of case by the language).
No wonder there are so many problems, at least in business, if people think binary arithmetic is "best practice". It troubles me when I see code comments full of spelling errors. Sometimes that's witty, but usually it suggests ignorance or contempt for precision which is a rather essential attribute for programming. Rexx came out in the days when VM was a kind of counter-culture within IBM. You got the source code too. Didn't use Rexx much, but I was struck by the elaborate annotations and the literacy of the comments. There was nothing sloppy about it, in fact it made much of the other VM (and MVS) source code look pretty slapdash. (That was the first time I'd ever seen mixed-case comments - many of the assemblers then "folded" everything into upper case.) Presumably the new versions aren't written in BAL. I wish somebody would take the Rexx decimal support and put it into Java/ECMA-script.
"If that miggy ever dies for good, we'll have to rewrite them in bash, and that will take a couple of weeks to translate I expect."
Nah. Just run an Amiga emulation box and keep going:
http://www.amigaforever.com/