Boo a new language for CLI family

Boo is a new programming language under development, you can consider it a static type Python
![Big Smile [:D]](/emoticons/emotion-2.gif)
because the syntax looks very much like Python, but it is still static type language
first let's start with HelloWorld application
print "Hello World" pretty simple and pretty much like Python,
let's see something more, what about fibonacci searies with boo generators
def fib(limit as long):
a, b = 0L, 1L
while b < limit:
yield b
a, b = b, a + b
x = [i for i in fib(100)]
print x
and the result will be a list
[1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
as you see it is very much like python but with type checking
and now let's see a Boo Windows Forms application
![Wink [;)]](/emoticons/emotion-5.gif)
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)
and the result will be just like that

and it comes with some new things like
CarryingplusX = { a as int | return { b as int | return a + b }}
print plusX(3)(4)In English: "plusX is a function taking integer a, which returns another function taking integer b that returns a+b."
Duck Typing
This is one of the coolest things in Boo, that even it is a static typed language that written like python, but sometimes it acts like dynamic language if you want, just use the
duck type like this
static1 as int dynamic1 as duck
static1 = 0
dynamic1 = 0
print static1 + 1 print dynamic1 + 1
#static1 = "Some string" dynamic1 = "Some string"
#print static1.ToUpper() print dynamic1.ToUpper()
dynamic2 as duck = static1
print dynamic2 dynamic2 = "Some string"
print dynamic2.ToUpper()
static2 as string = dynamic1
print static2.ToUpper()
#static3 as int = dynamic1 #print static3 + 2
booish.exe
booish.exe is interactive interpreter tool, just like python console that you can run code against it and get the results immediately
>>> 3 + 4
7
>>> _ * 2
14
so, as a concolusion for this, Boo is a good competitor for Iron Python, as it can act like a dynamic language as well as being a static language that gets more features from dotnet,
my next article I think, it will be about Boo and WWF, just to see if it will run right or it will have the same problem as Iron Python
at last, you can start write codes for Boo with
SharpDevelop and you'll get all the IDE features like Intellisence, Coloring and Debugging
Regards