Mike Nichols - Son of Nun Technology

Boo Generic Syntax

I wanted to write a quick note to highlight Boo generics syntax since I had some difficulty finding clear docs on this. As I am digging into brail and using Binsor this'll be handy since the latest drop of Boo supports generics.

This states that generic type definitions in Boo are handled thus:

 MyType of MyGenericParam

or for multiple generic parameters

MyType[of X,Y,Z]

Also found a discussion here.

So in Binsor to register a component, it could be something like:

Component(name,IMyService[of IThing1,IThing2],MyImplementation,LifestyleType.Eternal)

 

Tasty!