看到一篇关于C omega 的 blog,看看未来的代码长什么样:
either { int; string; } x = 4711;
int ? n = x.Length; // null
Type t = x.GetType(); // System.Int32
int* odds2 = nats.{if(it%2 == 1) yield return it;};
Book F = <Book>
<Title>Faust</Title>
<Author>Goethe</Author>
</Book>;
Book K = <Book>
<Title>De Klompeniers</Title>
<Author>Jac. Broersen</Author>
</Book>;
Book* books = { yield F; yield K; };
string* authors = books...Author;
Cω 主页:
http://research.microsoft.com/Comega/
打印 | 张贴于 2004-12-03 19:38:00 | Tag:暂无标签
留言反馈