Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: [OT] Rebol vs Ruby

From: greggirwin:mindspring at: 31-Oct-2005 15:59

Hi Peter, PC> I would like to ask if anyone could give a brief summary PC> of what's the difference between Rebol and Ruby. Ruby is a programming language for programers. REBOL is a language used to exchange information; sometimes that information is a script for the computer to execute. Ruby has ~40 reserved words. REBOL has none. Ruby has ~7 datatypes. REBOL has 30+. Ruby has a number of standard classes for things that REBOL does not (e.g. bignums). Some things that are built into REBOL, e.g. net access, are available as Ruby libraries. Ruby is case sensitive and uses sigils. REBOL is not case sensitive, and words (variables) can contain all but a few special characters. Ruby has cool block and iterator support, making it more dynamic than some other programming languages. In REBOL, everything is data. Evaluating data can make you think it's code you're writing. Ruby is pure OO, and has mixins rather than multiple inheritance. REBOL creates objects from prototypes. An object in REBOL provides context and acts as a namespace. With Ruby, you have to write in an OO manner (obj.method). REBOL was designed to build dialects that let you express things any way you want. Ruby has special built-in vars like Perl; REBOL does not. Ruby has regexes; REBOL has the PARSE function. The Pragmatic Programmers. Ruby has a standard debugger and profiler; REBOL does not. REBOL has built-in HELP and SOURCE functions, including full support for reflection with doc-strings. Ruby uses a separate tool to extract embedded documentation written in a lightweight text markup format. You can write Ruby extensions in C; REBOL can call DLLs. Ruby on Rails. Rebcode. REBOL/View has a built-in GUI system (full 32-bit compositing for every face, 14+ pipeline effects, AGG draw engine). Ruby needs to use something like Tcl/Tk for GUIs. Ruby is more popular than REBOL, and seems to be growing faster. REBOL can create standalone EXEs that have no external dependencies. A zipped REBOL/Core is a ~190K download; ~350K for View. The one-click Ruby installer for Windows is ~14.8M (it contains extras like Tcl/Tk). It's not easy to compare REBOL with programming languages, though it can hold its own on their turf. You're comparing apples and oranges to a great extent. You really need to compare REBOL to Ruby+XML, for example. Ruby is a blend of ideas from other programming languages, with some new bits thrown in (no offense meant to Matz; Ruby is what I might be using if not for REBOL). REBOL is different; really different; and we don't know how to exploit it fully yet. Ruby is meant for programmers; REBOL is meant for humans. So, Ruby is better if you're coming from Perl or an OO mindset and don't want to stretch your mind too much; just get things done in a language that's similar to what you know, with a few new twists. REBOL is great if you want to stretch your mind and learn to think in new ways. It's also an excellent choice if you want to build Domain Specific Languages (DSLs), which have been around a long time, but are one of the "new" trends on the horizon from MS and others. REBOL's built-in GUI system is also a standout feature, as is its small size. HTH! -- Gregg