What's The Scoop On REBOL? 8
muggs asks: "After reading this article in Byte, I'd like to hear people's experiences and opinions about REBOL." The language's creator, Carl Sassenrath, describes REBOL (Relative Expression-Based Object Language) as "a highly dynamic, polymorphic, reflective, context-dependent, symbolic, functional language...a powerful tool that provides great productive leverage." How well does it live up to this description?
Quick summary of the language... (Score:4)
Anyhow, one interesting result of the Forth-like nature is that there are a huge number of datatypes which are not possible in other languages; for example, URLs are actually formal datatypes, not just another string (a malformed URL is a compile-time error).
They've obviously learned from Perl and Python otherwise; it's a nicely dynamic language which seems to be error-tolerant, and has quick, easy syntax for most needs.
I'm reasonably happy with it. It doesn't look as _nice_ as Python, but at least its braces and brackets have a purpose. It's not nearly as messy as perl can get, either.
I like it. (Score:1)
Re:Quick summary of the language... (Score:2)
penup setxy 100 200 pendown
Which parses as (in a C-like syntax):
penup(); setxy(100, 200); pendown();
It knows that penup takes no arguments, so setxy must be a new statement, and so on. This avoids a lot of the parenthesis that exist in Lisp code (which is, of course, closely related to Logo).
I don't know what the semantics of REBOL are like -- I get the impression this might be more similar to Forth in some ways.
Re:Quick summary of the language... (Score:3)
It's not bad at all... (Score:4)
Re:Quick summary of the language... (Score:2)
Forth programming relies on the concept of computing as pushing and popping values on the stack (1 2 + means "push 1 on the stack, push 2 on the stack, pop them both into hidden registers, have the ALU add them, push the result from the result register into the stack").
Whereas in REBOL, non-continuation-based Lisps, etc. it's mostly an implementation detail ((+ 1 2) could mean the exact same thing - hell, I myself have implemented a little linear Lisp that compiled to asm for an old stack machine -, or it could mean "put 1 and 2 into the i1 and i2 registers, look up the address of + in a symbol table, jump to that address", or even just "let k be a closure such that k x = x + 1; then the result is k 2").
Re:Scripting V. Nonscripting? (Score:1)
Example: check out Python's binding to the Qt library. Python will bind to other things too, like OpenGL. The main deal will be the speed. If you don't need it, Python's great. Otherwise use a compiled language.
questions to ask (Score:1)
Is it well designed? Proven? Can standard tools (emacs, etc.) cope with the syntax? Too much flexibility in defining and extending the syntax can be disadvantageous for languages, in particular if you expect to have multiple programmers working on a project.
Are there available alternatives? There are zillions of nice little scripting languages for all sorts of purposes. Many of them have extensive tool support. Just some that come to mind are Perl, Python, PHP, Lua, Scheme, Pike, Tcl/Tk, JavaScript, VBScript, and Visual Basic.
Altogether, I'm doubtful that the world needs another scripting language, in particular one that seems to allow tricky syntactic redefinitions and appears to be proprietary as well.