BookRags.com Literature Guides Literature Guides Criticism/Essays Criticism/Essays Biographies Biographies My Bibliography Periodic Table U.S. Presidents Shakespeare Sonnet Shake-Up
Research Anything:        
History | Encyclopedias | Films | News | Create a Bibliography | More... Login | Register | Help

Boo (programming language)

Print-Friendly
About 2 pages (614 words)

Bookmark and Share
Boo
Image:BooLogo.png
Paradigm Object oriented
Appeared in 2003
Designed by Rodrigo B. De Oliveira
Developer Rodrigo B. De Oliveira
Latest release0.8/ 2007-10-17
Typing discipline static, strong, duck
Major implementations auyu6
Influenced by Python
OS .NET Framework, Mono Runtime
License MIT/BSD style license
Website boo.codehaus.org

Boo is an object oriented, statically typed programming language developed starting in 2003, which seeks to make use of the Common Language Infrastructure support for Unicode, internationalization and web style applications, while using a Python-inspired syntax and a special focus on language and compiler extensibility. Some features of note include type inference, generators, multimethods, optional duck typing, macros, true closures, currying, and first class functions. Boo is open sourcelicensed under an MIT/BSD style license. Boo can be used with Microsoft .NET or Mono.

Contents

Code samples

Hello world program

<source lang="python"> print "Hello, world!" </source>

Fibonacci series generator function

<source lang="python"> def fib():

   a, b = 0L, 1L       #The 'L's make the numbers 64-bit
   while true:
       yield b
       a, b = b, a + b
  1. Print the first 5 numbers in the series:

for index as int, element in zip(range(5), fib()):

   print("${index+1}: ${element}")

</source>

Basic Windows Form example demonstrating classes, closures, and events

<source lang="python"> import System.Windows.Forms import System.Drawing class MyForm(Form):

   def constructor(message as string):
       b = Button(Text: "Click Me")
       b.Location = Point(100, 50)
       b.Click += do():
           MessageBox.Show(message)
           
       self.Controls.Add(b)

f = MyForm("you clicked the button!") Application.Run(f) </source>

Asynchronous design pattern with a closure

<source lang="python"> import System def run():

   print("executing")

print "started" result = run.BeginInvoke({ print("called back") }) System.Threading.Thread.Sleep(50ms) run.EndInvoke(result) print "done" </source>

See also

Free software Portal
  • IronPython - an implementation of Python for the .NET platform, similar to Jython.
  • Nemerle - a high-level statically-typed programming language for the .NET platform. It offers functional, object-oriented and imperative features as well as macros.
  • Groovy - a language with similar objectives but targeting the Java Platform

External links

View More Summaries on Boo (programming language)
 
Copyrights
Boo (programming language) from Wíkipedia. ©2006 by Wíkipedia. Licensed under the GNU Free Documentation License. View a list of authors or edit this article.

Article Navigation
Join BookRagslearn moreJoin BookRags


About BookRags | Customer Service | Report an Error | Terms of Use | Privacy Policy