惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - Adrian H.

Hello in 2025 Hello World 为Silverlight控件添加鼠标滚轮支持 - Adrian H. - 博客园 LINQ表达式中关于显式范围变量的Bug jQuery太好使了 一次性下载.NET源码和pdb,并在VS2005中进行调试 Windows Server 2008: Server Core初体验 - Adrian H. Volta : Democratizing the Cloud, 1st CTP Released! Parallel Extensions for .NET 3.5 CTP! Silverlight 2.0, .NET类库源码, ASP.NET MVC... VS 2008与老版本插件的兼容性问题导致Crash Silverlight Tools for VS 2008 RTM [C# 3.0] 传递匿名类型对象的问题 Visual Studio 2008 RTM! 在 .NET Framework x (x < 3.5) 环境下运行带有扩展方法(Extension Method)的程序 使用ActionScript 3中的反射,实现单元测试TestRunner ASP.NET MVC Framework Announced .NET Framework 源代码将于今年发布 N-Tiers?
C# Future Focus: 动态查找(Dynamic Lookup)
Adrian H. · 2008-02-05 · via 博客园 - Adrian H.

C#小组Charlie Calvert在其博客发了一篇有关C#语言未来方向的文章,这片文章介绍了一个叫做动态查找的特性,它为.NET语言(包括建立在DLR上的语言)能有一个统一的动态运行时名称绑定方案,让C#能与其他.NET动态语言(如IronPython和IronRuby)进行交互。它的应用场景包括:

  1. 办公自动化:其实就是能更方便得调用Office的COM Interop,避免了膨胀的类数目
  2. 与动态语言交互:动态!动态!
  3. 调用反射:更方便的运行时动态调用

 
未来的C#动态部分可能采取一下的语法,即使用dynamic与静态部分分离:

static void Main(string[] args)
{
    dynamic
    {
        object myDynamicObject = GetDynamicObject();
        myDynamicObject.SomeMethod();         // call a method  
        myDynamicObject.someString = "value"; // Set a field
        myDynamicObject[0] = 25;              // Access an indexer
    }
}

其实ActionScript本身是动态语言,在3.0中加入了静态特性,同时也支持dynamic class和dynamic call等完全的ECMAScript的特性,有时候我写AS3的时候觉得比C#还舒服,我只是写一个小testing程序,为什么我要声明它的类型?于 是我们的C#也要来凑动态语言的热闹了,本身纯洁的C#已经慢慢变成了一个大杂烩……很早前看到的一篇文章说Microsoft就是一个厨师,总是希望能 满足所有人的口味,但那真的不好做,事物必须得发展(与时俱进)。

我一直觉得还没有一个语言能让我满足,现在的程序开发中依然有许多冗余的信息和文本,我始终觉得人的逻辑到计算机的映射可以更加无损和简洁。期待未来吧,C# 4.0,还有VS 10。

Original Post: http://x-dev.cn/post/C-Future-Focus-e58aa8e68081e69fa5e689beefbc88Dynamic-Lookupefbc89.aspx