Using a class in an exe in Boo

Boo is great for lightweight experiments:

===  myclass.boo ===

namespace foo

class myclass:
    def foo():
        print(“Hello”)

c = myclass()
c.foo()

===============

=== myclass2.boo ===

import foo from “myclass.exe”

c = myclass()
c.foo()

=================

Create the two above files.

Compile both with the booc compiler. 

 run myclass2.exe

This shows how easy it is to extend a .net app in Boo. 

Leave a comment