From: Lionel Thiry Date: 2005-11-02T23:37:07+09:00 Subject: Re: [OT] Ruby vs REBOL Peter Carlsson a �crit : > Hello! > > I apologize if this is a little bit off topic. > > As part of my master thesis I am about to develop some > scripts using Ruby. As I have never used it before and > using REBOL for six years I would like to ask if anyone > could give a brief summary of what's the difference > between Ruby and REBOL. > > I have found plenty of information on the internet that > compares Ruby with other languages, but not with Rebol. > > I realise that I'm on a list for Ruby, and the answers > might be a little biased, but what are the pros and cons > for these languages? > > Best regards, > Peter Carlsson > > > 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 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. 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. 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. -- Lionel Thiry Personal web site: http://users.skynet.be/lthiry/