在静态语言中使用duck类型的限制。
动态语言与静态语言的互操作。
在静态语言中,优化器可以根据类型信息来进行决策。
In a static language, optimizers can exploit the type information to make decisions.
静态语言的另外一个小的好处就是编译时期的额外检查。
Another small benefit of static languages is the extra checking the compiler performs.
相比静态语言来说,优化动态语言的性能更富有挑战性。
Optimizing the performance of a dynamic language is more challenging than for a static language.
这些优化都是着力于类似于c这样的静态语言生成的中间表示。
The optimizations are all designed to work on IR generated by static C-like languages.
在静态语言中,编译器在编译时直接将调用绑定到实现。
You've seen that with static languages, the compiler directly binds an invocation to an implementation at compile time.
我们都曾经在不同的时间和静态语言和动态语言打过交道。
We have worked with both static and dynamic languages, at various times.
稳定层(stable layer)—不包含大量的应用程序功能,可以使用静态语言构建。
A stable layer - not much application functionality, built with static languages.
不幸地是,为xml定义链接系统远远比为静态语言(例如HTML)定义链接系统复杂。
"Unfortunately, defining a linking system for XML has proven to be far more complex than doing so for a static vocabulary such as HTML."
总体上说,应用动态语言和静态语言是相当简单的,DLR的存在很好的证明了这个观点。
It is reasonably easy with dynamic and static languages in general as can be illustrated by the existence of the DLR.
Charles:我认为JVM是目前最好最快的途径,不论对于静态语言还是动态语言。
Charles: I think the JVM is by far the best way to get a new language up and going quickly, whether it's static or dynamically-typed.
虽然近年来在动态语言优化方面的提升渐渐浮现希望,但是它们还是落在静态语言的优化艺术的后面。
While recent advancements in optimizations for dynamic languages are promising, they lag behind the state of the art for static languages.
许多开发者发现静态语言太过冗长,抱怨静态类型是冗长的元凶,而事实上真正的原因是缺少类型推断。
Many developers who find static languages too verbose often blame static typing for the verbosity when the real problem is a lack of type inference.
当使用一种静态语言时,你必须时刻考虑使用恰当的类型。这迫使你在选择设计时更加小心。
When using a static language, you have to think about appropriate type choices more often, which forces you to weigh design choices more carefully.
静态语言仍将占据着统治地位(来源:Tiobe),同时这些语言还是需要借助于代码生成技术来提升程序员的生产力。
Static languages still dominate the overwhelming majority of language use (source: Tiobe) and such languages depend on code generation techniques for programmer productivity.
这又经常导致动态语言的支持者指责静态语言总是太低级,用它们来编写应用程序生产率很低——但那是一种很狭隘的观点。
This often leads fans of dynamically typed languages to accuse statically typed languages of always being too low-level to be productive languages for applications — but that's a narrow world view.
DebasishGhosh对一场动态VS .静态语言的讨论做出了回应,提出了用静态语言编程时动态类型检查的使用问题。
Echoing at a discussion on dynamic vs. static languages, Debasish Ghosh raises the issue of using dynamic type-checking while programming with static languages.
作为一名新的Ruby拥护者,我深信动态语言更能提高生产率,虽然我不能比常见的静态语言的支持者拿出更多具体的证据来。
As a new Ruby convert, I strongly believe that dynamic languages are more productive, though I don't have any more hard evidence than a typical static-language proponent.
这个世界是动态的;为什么编程语言应该是静态的?
The world is dynamic; why should a programming language be static?
正如我们在前面的章节所描述的,一个静态类型的语言在一个变量的生命周期内都会绑定一个类型。
As we described in the previous section, a statically typed language binds the type to a variable for the lifetime of that variable.
在这三个角度中,静态类型与动态类型对于语言的特征有最大的影响,因此接下来我将重点解释这两种策略各自的优点。
Of the three axes, static versus dynamic typing tends to have the most impact on a language's character, so I'll focus now on these two strategies' respective strengths.
如果想要具有静态类型检查的语言,那么的确需要从一开始就把它设计到语言中:它极大地影响着语言的设计。
If you want a language with static type-checking, you really need to design it in from the start: it drastically affects the design of the language.
如果您想要静态页面支持不同的语言或者场所,那么您可以轻易地使用静态页面聚合技术。
If you want your static page to support different languages or locales, you can do so easily courtesy of the static page aggregation technology.
这一策略允许使用强大的代码重构工具,而使用静态类型语言的同样方法来实现此功能则困难得多。
This strategy allows powerful code refactoring tools, which are much more difficult to achieve using the same methods for statically typed languages.
静态类型语言在编译时实施类型。
无论在何种语言中这都是非常恼人的问题,但对于静态类型语言来说更是如此,因为开发者需要将这些无名类型映射到实际的类上。
This is annoying in any language, but especially problematic for statically typed languages where one wants to map those unnamed types to actual classes.
得到的API是一组静态定义的方法,灵活完全比不上语言本身!
The resulting API isn't so much a series of statically defined methods as a flexible language in itself!
静态局部变量之所以非常令人感兴趣,是因为公共语言运行库(CLR)不支持方法内的静态变量。
The static local variable is interesting because the common language runtime (CLR) does not support static variables inside a method.
静态局部变量之所以非常令人感兴趣,是因为公共语言运行库(CLR)不支持方法内的静态变量。
The static local variable is interesting because the common language runtime (CLR) does not support static variables inside a method.
应用推荐