developer.com
Search EarthWeb
CodeGuru | Gamelan | Jars | Wireless | Discussions
Navigate developer.com
Architecture & Design  
Database  
Java
Languages & Tools
Microsoft & .NET
Open Source  
Project Management  
Security  
Techniques  
Voice  
Web Services  
Wireless/Mobile
XML  
Technology Jobs  

   Developer.com Webcasts:
  The Impact of Coding Standards and Code Reviews

  Project Management for the Developer

  Defining Your Own Software Development Methodology

  more Webcasts...




See the Winners!


Developer Jobs

Be a Commerce Partner
Laptop Batteries
Rackmount LCD Monitor
PDA Phones & Cases
Compare Prices
Online Shopping
Promotional Gifts
Best Price
Baby Photo Contest
Condos For Sale
Build a Server Rack
Memory
Televisions
Online Education
Imprinted Promotions

 


Developer News -
SaaS Tool Offers Custom Database Development    May 9, 2008
Microsoft’s Automated Agent: Can We Talk?    May 7, 2008
Borland Finally Sells CodeGear    May 7, 2008
Red Hat Heads For The JON 2.0    May 7, 2008
Free Tech Newsletter -

Project Management Guide: Developing a Web Site. Best Practices, Tips and Strategies. Download Exclusive eBook Now.

REBOL: new, simple, yet powerful
By Piroz Mohseni


Programmers often face complex problems as they attempt to model real-world interactions in a programming language. One assumption I always had was however complex the problem, the environment/language used by the programmer must also be as complex. Recently, I have been reconsidering this position. I now think simple languages paired with good design can tackle many complex problems; and can do so with more effectiveness and ease than complex languages. I arrived at this conclusion after the introduction of language called REBOL.


If there is one adjective that can describe REBOL, it is simple.


REBOL (pronounced REB-ul) stands for Relative Expression-Based Object Language. REBOL is an environment plus a language. The environment has been ported to over 30 different platforms making REBOL a cross-platform application. If there is one adjective that can describe REBOL, it is simple. The language constructs, syntax, operators and notations are based on the idea that they should be simple to learn use. Given that premise, the designers have succeeded. REBOL is the only language I could code after reading a document called "REBOL in Ten Steps."

Getting started in is very easy. You can download the language for your platform from the REBOL Web site.The environment consists of a single executable file, plus a few configuration files. REBOL has an interactive environment which reminds me of old BASIC interpreters. In REBOL, everything has a value. The interpreter evaluates everything you type and determines its values.

There are two data types in REBOL. Primitive types include numbers, strings, dates, money, Email, and URL. Constructed data types include objects and functions. The values of expressions and constructs always fall under one of the two data types mentioned above.

REBOL is highly network-aware. Sending email messages or accessing a URL is very easy within REBOL. So simple that Email and URL are considered primitive types in REBOL!


Just like other languages, REBOL supports variables.


Just like other languages, REBOL supports variables. The following code segment shows a variable assignment followed by printing the value of the variable. I suggest you download the REBOL environment for your platform so you can follow along with the remaining examples. The code containing >> is what to type in and the code containing == is what the REBOL interpreter outputs.

>> myname: "Jim"
== "Jim"
>> print myname
Jim

With default configuration, the >> is the command prompt. Result of a command is printed on a line that starts with = =. Both of these symbols are customizable.

Another characteristic of REBOL is usage of natural language commands. The following code segment defines a block. (Blocks are a collection of words and values. The beginning and end of a block is noted by [ and ] respectively.)

>> fruit: ["Apple" "Orange" "Banana" "Peach"]
== ["Apple" "Orange" "Banana" "Peach"]
>> print first fruit
Apple
>> print third fruit
Banana

As mentioned before, REBOL is well aware of various networking protocols and has built-in support for them. In the user.r configuration file, you can specify your email address along with the address of an SMTP server, so you can compose and send email right from the REBOL environment. The following code segment, shows you how an email message is sent via REBOL:

send joe@somedomain.com {
                     Hello,
                     How are you?
                     Let's have lunch.  
                  } 

Try the above code and send an email to yourself to appreciate how easy it is. Typically, REBOL code is stored in files with the .r extension. It is advisable that you divide a large application into several files and then call each one as needed. You can load an entire file and have REBOL execute it both from within the REBOL environment and from the outside (through a command-line argument). The latter approach is important, because it allows REBOL to be integrated into other applications. For example, REBOL can easily be used as a CGI programming language.

REBOL has some support for Object-oriented constructs, but it is not a full OO language. One can consider REBOL a hybrid of the OO and Functional paradigms. This allows REBOL to be less rigid and more flexible than other languages. REBOL can also be programmed in other languages; most likely more effort is needed when dealing with other languages.


There are a number of read-to-go applications on the site that provide you with a glimpse of what REBOL can do.


To learn more about practical aspects of REBOL, you should visit the Web site. There are a number of read-to-go applications on the site that provide you with a glimpse of what REBOL can do. For example, there is a utility that measures how long it takes to receive a response from various Web sites. Another utility performs a search and replace operation across several files in a directory. REBOL also provides a mailing list where developers can discuss various issues and share their solutions.

Today's problems are generally complex. While sophisticated languages like C++ or Java are used to tackle such problems, REBOL advocates a new approach where simplicity along with good design is used to address complex issues. While this approach may not work everywhere, it does offer an alternative to think about. REBOL offers an environment based on simplicity, yet it is flexible and powerful.


About the author:

Piroz Mohseni is President of Bita Technologies focusing on business improvement through effective usage of technology. His area of interest includes enterprise Java, XML and ecommerce applications.

 


Tools:
Add www.developer.com to your favorites
Add www.developer.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed


Other Language Archives

Best Practices for Developing a Web Site. Checklists, Tips & Strategies. Download Exclusive eBook Now.
Whitepaper: Embeddable Content Platform for OEM's
Data Sheet: IBM Information Server Blade
Flash Demo: Learn how IBM Information Server Blade is easy to manage, highly scalable and efficient.
Learn about expanding business opportunities for the reseller channel. Visit IT Channel Planet.



JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: HyperV-The Killer Feature in WinServer ‘08
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Win Server ‘08
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES