Boo (programming language)
Boo | |
---|---|
Object-oriented language |
|
Basic data | |
Paradigms : | Object-oriented language |
Publishing year: | 2003 |
Designer: | Rodrigo B. De Oliveira |
Developer: | Rodrigo Barreto de Oliveira |
Current version : | 0.9.4 (January 23, 2011) |
Typing : | static (see text) |
Influenced by: | C # , Python |
Affected: | Genius , Vala |
Operating system : | Windows , Linux , macOS , and many more |
License : | MIT / BSD |
https://boo-language.github.io/ |
Boo is a programming language developed by Rodrigo Barreto de Oliveira since 2003 for the Microsoft CLR , but it can also be used with Mono . The syntax is very similar to that of Python .
Speech characteristics
Boo is statically typed , whereby the programmer is largely spared the explicit specification of types of variables through type inference and generic types . In addition, the slower of is Ruby acquired duck typing , so dynamic typing necessary. This makes it very fast on the CLR, which is explicitly designed for statically typed languages, without having to forego the flexibility of a scripting language.
The language inherits generators from Python. It supports a relatively large number of built-in literals for lists, hashes and regular expressions , for example . In addition, for an OO language there are modern features taken from functional programming such as first-class functions and real closures . What sets the language apart from other languages in the Java and .NET world is that it offers syntactic macros that are just as easy to use as in Dylan .
License
Boo is free software with its own license, which is very similar to the MIT and BSD licenses .
Code examples
Hello world program
print "Hallo Welt!"
Functions
Function to generate the Fibonacci numbers :
def fib():
a as long, b as long = 0, 1
while true:
yield b
a, b = b, a + b
Windows Forms
Simple Windows Forms example with classes , closures and events:
import System.Windows.Forms
import System.Drawing
class MyForm(Form):
def constructor():
b = Button(Text: "Click Me")
b.Location = Point(100, 50)
b.Click += do():
MessageBox.Show("you clicked the button!")
self.Controls.Add(b)
f = MyForm()
Application.Run(f)