boo 中的 lambda 表达式
剂量 boo 理解表达树吗?
我尝试使用锐利开发来编译这一行
exp as System.Linq.Expressions.Expression[of Func[of SomeClass, bool]] = { p as Text | return (p.Name == 'tttt') }
,但锐利开发引发了此错误
Cannot convert 'callable(testlinq.SomeClass) as bool' to 'System.Linq.Expressions.Expression[of System.Func[of testlinq.SomeClass, bool]]'. (BCE0022)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Boo 的表达式树比 C# 还要长。
http://ayende.com/blog/3065/meta-methods
IIRC Boo 的设计允许元编程宏(很像 Lisp、Nemerle 和许多其他函数语言),并因此允许完全访问 Boo 代码的任何片段的 AST。
现在这一切都是凭记忆提供的,因此我建议您查阅 Boo 文档以获取最新信息。
Boo has had expression trees longer than C#.
http://ayende.com/blog/3065/meta-methods
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.