Boo programming language
Encyclopedia : B : BO : BOO : Boo programming language
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, globalization 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 source–licensed under an MIT/BSD style license.
Boo can be used together with Microsoft .NET and Mono.
Code samples
print "Hello, world!"
def fib():
a, b = 0L, 1L
while true:
yield b
a, b = b, a + b
Basic Windows Form example demonstrating
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)
Asynchronous design pattern with a
import System
def run():
print("executing")
print "started"
result = run.BeginInvoke()
System.Threading.Thread.Sleep(50ms)
run.EndInvoke(result)
print "done"
See also
- redirect[[Template: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.
External links
- [Boo Homepage]
- [Boo Language Guide]
- [Boo Google discussion group]
- [Duck Typing] - dynamic typing in boo
- ["Gotchas" for Python users]
- [Boo Recipes], including:
- *[Serializing objects]
- *[Regular expressions]
- *[Invoking native methods with DllImport]
- *[3D OpenGL Samples]
- *[Multimethods in boo]
- *[Dynamic Inheritance - fun with IQuackFu]
def fib(): a, b = 0L, 1L while true: yield b a, b = b, a + b
Basic Windows Form example demonstrating
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)
Asynchronous design pattern with a
import System
def run():
print("executing")
print "started"
result = run.BeginInvoke()
System.Threading.Thread.Sleep(50ms)
run.EndInvoke(result)
print "done"
See also
- redirect[[Template: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.
External links
- [Boo Homepage]
- [Boo Language Guide]
- [Boo Google discussion group]
- [Duck Typing] - dynamic typing in boo
- ["Gotchas" for Python users]
- [Boo Recipes], including:
- *[Serializing objects]
- *[Regular expressions]
- *[Invoking native methods with DllImport]
- *[3D OpenGL Samples]
- *[Multimethods in boo]
- *[Dynamic Inheritance - fun with IQuackFu]
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)
import Systemdef run(): print("executing")
print "started" result = run.BeginInvoke() System.Threading.Thread.Sleep(50ms) run.EndInvoke(result)
print "done"
See also
- redirect[[Template: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.
External links
- [Boo Homepage]
- [Boo Language Guide]
- [Boo Google discussion group]
- [Duck Typing] - dynamic typing in boo
- ["Gotchas" for Python users]
- [Boo Recipes], including:
- *[Serializing objects]
- *[Regular expressions]
- *[Invoking native methods with DllImport]
- *[3D OpenGL Samples]
- *[Multimethods in boo]
- *[Dynamic Inheritance - fun with IQuackFu]
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
