Reputation:
dose boo understand Expression tree?
I try to compile this line with sharp develop
exp as System.Linq.Expressions.Expression[of Func[of SomeClass, bool]] = { p as Text | return (p.Name == 'tttt') }
but sharp develop raised this error
Cannot convert 'callable(testlinq.SomeClass) as bool' to 'System.Linq.Expressions.Expression[of System.Func[of testlinq.SomeClass, bool]]'. (BCE0022)
Upvotes: 1
Views: 573
Reputation: 392893
Boo has had expression trees longer than C#.
http://ayende.com/blog/3065/meta-methods
[Meta]
static def verify(expr as Expression):
return [|
unless $expr:
raise $(expr.ToCodeString())
|]
IIRC Boo was designed to allow meta-programming macro's (much like Lisp, Nemerle, and many other functional languages) and has as such allowed full access to the AST of any fragment of Boo code.
Now this is all served from long memory, so I advise you to consult the Boo documentation for up-to-date information.
Upvotes: 1