R – Defining operators in Boo

boomacrosmetaprogrammingnemerle

I'm looking to move some of my lighter weight metaprogramming from Nemerle to Boo and I'm trying to figure out how to define custom operators. For example, I can do the following in Nemerle:

macro @<-(func, v) {
    <[ $func($v) ]>
}

Then these two are equivalent:

foo <- 5;
foo(5);

I can't find a way of doing this in Boo — any ideas?

Best Answer

While Boo supports operator overloading by defining the appropriate static operator function (op_addition), and also supports syntactic macros, it does not support creating custom operators at this time.

Related Topic