BrainDump
  Home arrow BrainDump arrow A Quick Tour of Boo
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BRAINDUMP

A Quick Tour of Boo
By: Peyton McCullough
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2007-08-06

    Table of Contents:
  • A Quick Tour of Boo
  • Program Structure and Variables
  • Arrays and Collections
  • Conditionals and Loops
  • Functions and Types

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Application developers can seamlessly integrate the Advantage Database install with their application install. Learn the best practices used when setting up silent installs with this seminar.

    A Quick Tour of Boo
    (Page 1 of 5 )

    If you're looking for a portable .NET language and don't want to use a C-style syntax, you might want to take a look at Boo. Don't let the name spook you; if you're comfortable with Python, you'll feel right at home with Boo.

    Introduction

    While the de facto .NET languages C# and Visual Basic .NET are certainly capable, only the former is especially portable (in practice, that is), and users coming from scripting backgrounds or users who don't enjoy C-style syntax may not feel at home. Fortunately, however, the Common Language Infrastructure allows support for multiple languages, and these languages can be used together as the developer sees fit. Boo is one such language for the CLI. It offers the features of the .NET Framework and Mono, and it features a Python-like syntax. In this article, we'll explore the Boo language and some of its basic features.

    Boo can be obtained at:

    http://boo.codehaus.org

    The Boo Toolbox

    Boo comes with three basic tools for working with Boo code. The first is the Boo compiler, which compiles Boo code into an assembly. It goes by the name of booc:

    $ booc HelloWorld.boo

    Boo Compiler version 0.7.8.2559 (CLR v2.0.50727.42)

    The next tool is the Boo interpreter. Instead of compiling a Boo file, you can interpret it using booi:

    $ booi HelloWorld.boo

    Hello World!

    It's also possible to interpret code directly form standard input:

    $ booi -

    print "Hello World!"

    print "Goodbye!"

    Hello World!

    Goodbye!

    The final tool is the Boo interactive interpreter, booish, similar to Python's interactive interpreter. As its name implies, it allows one to interact with it, immediately seeing the results of code, among other things:

    $ booish

    Welcome to booish, an interpreter for the boo programming language.

     

    Running boo 0.7.8.2559 in CLR v2.0.50727.42.

     

    The following built-in functions are available:

      dir(Type): lists the members of a type

      help(Type): prints detailed information about a type

      load(string): evals an external boo file

      globals(): returns the names of all variables known to the interpreter

      getRootNamespace(): namespace navigation

     

    Enter boo code in the prompt below.

    >>> print "Hello World!"

    Hello World!

    >>>

    More BrainDump Articles
    More By Peyton McCullough


       · Hello, all,I've always found Python's syntax particularly pleasing, but, at the...
     

       

    BRAINDUMP ARTICLES

    - Outsourcing: the Hoopla, the Reality
    - MySQL Plays in the Sun
    - All About SQL Functions
    - SQL: Functioning in the Real World
    - More Advanced SQL Statements
    - Beginning SQL the SEQUEL: Working with Advan...
    - Beginning SQL
    - A Look at the VI Editor
    - A Quick Tour of Boo
    - Book Review: Open Source Licensing
    - PGP and GPG: Email for the Practical Parano...
    - Microsoft Continues War on Open Source
    - Secure Remote Desktop Sharing with VNC on Li...
    - A Look at Google Project Hosting
    - What we can Learn from Two Linux vs. Microso...




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway