Lionel Thiry <lthiryidontwantspams / skynetnospam.be> writes:

> Ruby is fondamentally OO. For exemple, you never truly call any
> function, you just send messages to objects. While Rebol is
> fondamentally procedural with prototyped OO.

Rebol also makes use of generic functions and multi-method
dispatch/overloading (they call them "relative expression"); in Ruby
this is done with duck-typing.

> Rebol is a lot DSL based. Ruby may have DSLs but is not that much based
> on them. (DSL == Domain Specific Language)
>
> Block in Rebol is a fit-for-all construct which, among other things,
> allow to manage non evaluated piece of code (in other words: quotation).
> Block in ruby isn't a quotation, but it is still a piece of code which
> works as a closure i.e. it binds local variables of its enclosing scope.
> Ruby has a lot of facilities to manage blocks and use it almost everywhere.

Also, blocks in Rebol support introspection ("source"), in Ruby this
is basically not possible (at least not to the extent of Rebol, even
with nodewrap and ruby2ruby).  Ruby blocks therefore are not used to
store data, in Rebol they can be used as a data-structure ("Series!",
but compare with Ruby generators and Enumerable).  Rebol blocks are
first-class, a function can take any number of them.

Rebol's block share the defining scope too, there is a "hack"
("/local") (and sorry, I just call it that way because it's rather
similar to what awk does :-P) to introduce block-local variables.

> Rebol is dynamically typed while Ruby has in fact only one type: the
> object. It means ruby never checks types (but you still may explicitely
> check an object's class), it relies on its method dispatching system,
> alias the lookup, to tell you if a method call is valid or not.

Therefore, Ruby is dynamically typed too.  I don't think there is a
difference in the languages with respect to that, but my Rebol is
rather rusty.

> I don't remember if rebol had an exception framework, but I'm sure ruby
> has one. An invalid method call, for example, raises an exception.

Rebol has "catch", "throw" which are comparable to Ruby's method with
the same name.  An exception framework exists too, the exception
handling looks a bit more clumsy to my, though.

I'd like to add: Rebol's syntax is totally regular, there are no
exceptions for control-structure (I'm not sure if the control
statements are keywords or functions, I guess the latter.).  Compare
with Smalltalk, Io or Tcl.  This can be a curse or a blessing,
depending on your Lisp influence and your eyes.  Rebol doesn't have
operator precedence either.

Rebol has a BNF parser in the core, maybe comparable to Perl6's rules.
Ruby can provide these things with external libraries, which can be
very convenient due to syntactic sugar too.

Rebol/View has it's own GUI library, Ruby provides binding to a lot of
them (Tk, Gtk+, Qt, Cocoa, Win32, Wx, Fltk).

Ruby is open-source, available under the GPL and a BSD-like, more
permissive license; Rebol is available as binaries only.

Finally, Ruby has a friendly and strong community; Rebol has a lot
less users and less third-party libraries.

> Lionel Thiry
-- 
Christian Neukirchen  <chneukirchen / gmail.com>  http://chneukirchen.org