当前位置: 动力学知识库 > 问答 > 编程问答 >

Were method cascades ever considered for C#?

问题描述:

Smalltalk supports a syntax feature called "message cascades". Cascades are being adopted by the Dart Programming language.

As far as I know, C# doesn't support this. Were they ever considered during the design of the language? Is it conceivable that they could appear in a future version of the language?

网友答案:

In VB.Net there is the with keyword which I believe is used for this purpose (correct me if I'm wrong on this), however in C# they decided that it can often hurt readability and left it out (good in my opinion).

Some short details can be found at the below link, however the link to the microsoft page is no longer working:

http://blogs.msdn.com/b/csharpfaq/archive/2004/03/11/why-doesn-t-c-have-vb-net-s-with-operator.aspx

Note: If anyone has the following link archived I would love to read it (as the link is not working):

http://msdn.microsoft.com/vcsharp/team/language/ask/withstatement/default.aspx

分享给朋友:
您可能感兴趣的文章:
随机阅读: