“Boo is a new object oriented statically typed programming language for the Common Language Infrastructure with a python inspired syntax and a special focus on language and compiler extensibility.” Version 0.7 was released on Sunday.
Boo 0.7 Released
About The Author
Follow me on Twitter @thomholwerda
2005-10-11 11:15 pmdoug
“a good cross platform GUI lib”
You might check out GTK# and Mono. Also System.Windows.Forms works mostly cross-platform now thanks to Mono.
“the lack of all the nice Python and Java libraries”
Well I definitely like the standardized class library in .NET/Mono better than the hodgepodge of python’s standard lib. But regardless, you can use java’s standard library via IKVM and GNU Classpath, and you’ll be able to use python’s standard lib eventually via the ironpython project (just reference the right dlls).
“What keeps me away is the naming convention (methods starting with uppercase, that’s just plain evil)”
That’s the price of standardization. Case-insensitivity would help deal with that, however.
I do think though we need some nice wrappers (lowercased maybe) to simplify using system.windows.forms (similar to easygui for python), as well as wrappers for using xml and other things.
2005-10-11 11:26 pmAnonymous
>Case-insensitivity would help deal with that, however.
Good grief! With that cure I would rather stick with the disease.
2005-10-11 11:29 pmAnonymous
“>Case-insensitivity would help deal with that, however.
Good grief! With that cure I would rather stick with the disease.”
Boo is not case-insensitive. But there is a patch which gives it *optional* case-insensitivity. Nice argument though.
2005-10-12 9:47 pmBotty
Yeah, its a little – used command line argument
It’s interesting because it takes the ideas of langauges like Python, Ruby, etc.., and marries it to .NET.
Komodo, http://www.komodoware.com is using Boo or any other Mono language for its desktop/OS.
I think C# is step up from Java, but there’s still too much busywork/boilerplate compared to something like Ruby. That’s why Boo has a good potential. It has duck typing and macros, but also uses type inferencing and some type declarations for static typing.
Maybe there needs to be a BooOnRails Too bad that Monodevelop continues to suck bad a year and a half after its first release. I’ve built it from source numerous times on different distros and it either locks up my entire desktop until I kill it, or it bails with some kind of exception.
Maybe some Boo afficinado should take the plunge and write an eclipse plugin. There’s SharpDevelop, but that’s windows only
2005-10-11 11:18 pmdoug
“Maybe there needs to be a BooOnRails ”
Search for MonoRail and Brail.
“Maybe some Boo afficinado should take the plunge and write an eclipse plugin.”
There is a boo eclipse plugin, called booclipse. There are also addins for sharpdevelop and monodevelop. And a boo IDE called boodle. Although the manager of that project is a little nuts if you ask me.
2005-10-11 11:32 pmAnonymous
I use the Sharpdevelop plugin, it provides for a decent development environment. What’s missing is a Boo forms designer. Right now you have to do that in C# and convert to Boo. Fortunately there is hope for that in Sharpdevelop 2.0.
2005-10-11 11:40 pmAnonymous
It’s not a SWF designer, but using Boo with glade and gtk# is already possible, and as (http://mysterion.org/~danw/blog/2005/03/stetic) stetic improves, gets integrated into monodevelop, etc, you can look forward to a wonderful platform for doing Boo GUI development.
Monodevelop only runs on linux currently, but if any of the monthly “Does monodevelop run on windows?” people on the the monodevelop mailinglist steps up, you could see the same tools available on windows.
Boo integration in MD already exists today, so we’re just waiting on things like stetic.
2005-10-15 6:45 pmrenox
> I think C# is step up from Java, but there’s still too much busywork/boilerplate compared to something like Ruby.
I think that in its version 3, C# will get local type inference which should help on the too much boilerplate part..
This will be interesting as to my knowdledge, this will be the first mainstream language to get this feature.
A lot of the boilerplate/busywork that you have to do in C# is only done once in Boo by creating an AST attribute or macro. Have a look at Boo.Lang.Useful.dll.
– AsyncMethodAttribute: generates Begin/End<Method> to create the asynchronous method wrappers.
– DisposableAttribute: generates the disposable pattern for a class.
– HandlesAttribute: VB-style event handler attachment.
– OnceAttribute: Makes your method only run once.
– ResourceFacadeAttribute: Clones the VC#2005Express Resources.Designer.cs functionality (but more powerful).
– SingletonAttribute: makes your class a singleton.
– WithEventsAttribute: VB6 style event handler attachment.
– DoubleCheckedLockMacro: like “lock” only double-checked.
– FireAndForgetMacro: fire a delegate, no need to call the EndInvoke.
– TimeItMacro: used to time a piece of code.
There is a BooOnRails that ties into MonoRails called Brail (ayende.com)
There is an Eclipse plugin (it requies mono even on windows) called Booclipse.
So what exactly is the difference between Boo and Python apart from the .NET stuff and another syntax? What makes Boo better?
2005-10-12 3:04 amckknight
Boo has closures (like ruby), which is a very handy feature.
button = Button(Text: “Click me”)
button.Click += do():
print “The button was clicked!”
It is statically typed by default, so your code will be less prone to errors as well as being significantly faster.
2005-10-12 6:48 amMystilleef
Okay, Python has closures. And static typing isn’t really
considered a strength among dynamic language enthusiasts.
2005-10-12 11:38 amckknight
This must be why Python has optional static typing in mind for 3.0
2005-10-12 8:49 pmjapail
That’s not because people that are interested in dynamic languages are interested in it being there. It’s more like Python has become popular enough that people from statically typed languages are interested in using it.
2005-10-12 2:17 pmdoug
“Okay, Python has closures. And static typing isn’t really considered a strength among dynamic language enthusiasts.”
So your original question was just a troll then I see. Nice job, you hooked one.
2005-10-12 2:34 pmMystilleef
I’m being called a troll for asking legitimate question. What is world turning into?
2005-10-12 8:53 pmjapail
Do you have a reading disability the rest of us should be aware of before moderating your posts for trolling?
Really? I read about them considering this awhile ago but wasn’t aware they actually implemented it.
How does that work, can you choose between static and dynamic typing on the fly or something?
2005-10-12 2:58 amckknight
By default, things are statically typed. If you give -ducky as a command line option, it is dynamic.
You can also use dynamic code without that, in this example:
alpha as duck = 1
print alpha * 2
alpha = “Hello, World!”
print alpha, “:-)”
Anything “as duck” will be dynamic.
@Mystilleef: actually, a dynamic language lover would not find anything interesting in Boo apart from static typing (and macros, but not every person likes them). Boo is mostly appealing to C# developers.
2005-10-12 9:55 pmBotty
Its true, the point of boo isn’t the comparison between python and boo, rather the improvement over other .net languages.
It isn’t meant as something to replace python, in other words. More like something to replace C# (although C# 3.0 will implement some of boo’s cooler features, albeit with worse syntax).
If a python developer wants to do something in .NET the logical step would be to use boo.
ckknight, I might be fuzzy on my definition of closures, but that code you’ve provided doesn’t look like a closure to me. It looks like a lambda function (a lambda function is a dynamically created function).
A closure ‘closes over’ a variable (taking it from a different environment) into its own context… if I modified your code like this (I don’t really know boo syntax, but I think you’ll catch my meaning):
int a = 5
button = Button(Text: “Click me”)
button.Click += do():
print “The button was clicked!” + a
Then it becomes a closure, since the newly defined function “closes over” the definition of ‘a’, (which might be resolved immediately, or lazily evaluated). If that code gives you a compile error, than the language really doesn’t support closures, although it still might support lambda functions.
2005-10-12 11:40 amckknight
yea, sorry, you’re right.
The code you gave will work on Boo, btw. (except that you have to do a.ToString())
Note: Their website isn’t boo.com XD
that typing syntax looks an aweful lot like VB, replace ‘duck’ with ‘variant’ and they look identical. Boo, what you get if you breed Python and VB?
Butt ugliest syntax, ever.
2005-10-12 10:03 pmBotty
What? And C# is worse? lol. You clearly don’t know anything about syntax design. C# syntax is based off 30 year-old piles of crap. It’s designed for the computer, not the programmer.
The principals of boo’s syntax design are readability first, writability second. Brackets do not affect either, and tabbing forces nicer looking code. This benifits readability and writability – wrist easy they call it. no need to add more lines of code and brackets.
Oh, and the comment earlier about a VB/python hybrid – you clearly are just looking at some of the examples showing off duck typing. There’s tons of stuff that is written much better in boo than in VB. readability wise VB is better. Sure it doesn’t make you feel as ‘1337’, but niether does boo. If that ‘1337’ feeling comes from being able to write buggy code (the less readable the lang, the more likely you are to inadvertantly do something wrong) in a language noobs can’t understand without looking at it piece by piece, count me out. I can read and write C# fine, but I don’t choose to. I value my time as well as the beauty of well written code in a well written language.
2005-10-13 2:20 amSphinx
I may not know syntax design but I mix and match about thirteen different language syntaxes on a regular basis and I know what I hate. I do agree C# is more offensive than boo, maybe just a tad less than VB or python but not much.
Sure it doesn’t make you feel as ‘1337’, but niether does boo. If that ‘1337’ feeling comes from being able to write buggy code (the less readable the lang, the more likely you are to inadvertantly do something wrong)
A few of us actually embrace the art and craft of programming and are capable of writing bug free programs using only those 30 year old piles of crap you hold such disdain for that were used to produce your os/browser/word processor etc. without just cut and pasting pre-made objects. Yeah it took years of practice, extreme mental acuity, meditation and focus but I’ve always considered it time well spent, infinitely relaxing and still thoroughly enjoyable. Must be a generational thing, kids don’t have the patience anymore, <sigh> no respect for the ancient weapons.
I am not saying that just because the guy has the same first name as I do, but Rodrigo “Bamboo” Oliveira is genius programming language enginner (or whatever is called the people who creates programming languages)
If I were Guido von Rossum or another Python core developer I would pay some *very* serious attention to where Boo is heading, it could as well be the future of Python. It also kicks the ass of IronPython badly, maybe because it has a much more engaged group of developers.
I would love to have the chance to drop C# and use Boo as my main .Net programming language..well who know someday it might happen.
If there are two things that attract me to .NET it’s Boo and C#. Boo has most of what I like in Python, plus blocks and has lots of the things I dislike removed, C# is in many ways a saner Java. What keeps me away is the naming convention (methods starting with uppercase, that’s just plain evil) and the lack of all the nice Python and Java libraries and of course, a good cross platform GUI lib.
By the way, has anybody tried porting part of the Python libs to Boo? There are a large portion implemented in pure Python that would make good candidates.