Many people who love static typing prefer inferred typing.
很多喜欢静态类型的人更偏爱隐式类型。
This gives the benefit of static typing for join point context.
这为连接点上下文提供了静态类型化的好处。
Static typing does allow better tooling, but there's a downside, too.
静态类型确实能更好地使用工具,但是也存在缺点。
It has all of these features, and combines them with the benefits of static typing.
它拥有所有这些特性,而且结合了静态类型好处。
Those more familiar with static typing may say, "Well isn't that just an Interface?"
熟悉静态类型语言的人们可能会说,“哦,这不就是接口吗?”
The second one is the more reliable static typing aspect (but that needs to be proven).
第二点是更可靠的静态类型方面(还需要证实)。
At the most basic level, static typing exists to give the compiler much more information.
静态类型在最基层为编译器提供多得多的信息。
Static typing often works well with languages for building middleware or operating systems.
静态类型更适合用于构建中间件或操作系统的语言中。
It turns out that for many, static typing is a crutch that's no different from that ski restraint.
对于许多人来说,静态类型也是一种依赖,这和雪橇上的束带没有什么区别。
With OCaml, you pay minimal overhead for your static typing because the language is type inferred.
使用OCaml时,静态类型导致的开销很小,因为这种语言是类型推断式的。
Astro (node-xmpp) : I belong to the fraction that would recommend static typing for larger projects.
Astro (node - xmpp):我推荐在大型项目中使用静态类型。
Static typing possibly enables better security and definitely improves code readability in places.
静态类型可以提供更好的安全性,而且显然还可以提高代码的可读性。
But the biggest wins for static typing for most developers are earlier error detection and better tooling.
但是静态类型赢得开发人员青睐的最大原因是更容易检测错误,而且有更多可用的工具。
Enforcing static typing usually requires a compiler, and that compile step can absolutely crush productivity.
强制使用静态类型通常需要编译器,而编译步骤必然会降低生产力。
The compiler isn't the only tool that can take advantage of the additional information that static typing provides.
并不是只有编译器才能利用静态类型所提供的附加信息。
However, many developers would argue that static typing reduces the risk of undetected errors plaguing your program.
然而,许多开发者主张静态类型减少了困扰你程序的未被发现的错误。
Static typing can also provide more information that a compiler can use to make earlier optimizations, improving performance.
静态类型还可以提供更多的信息,使得编译器更容易进行优化,从而提高性能。
Sure, I can still see the benefits of static typing, especially in my tool sets, but I'm also starting to recognize the disadvantages.
诚然,我仍然会看到静态类型的优点,尤其是在工具集方面,但是我逐渐认识到了静态类型的缺点。
With static typing, the compiler can check the values of arguments, variables, or return values against values allowed for a given operation.
通过静态类型,编译器可以检查参数和变量的值或针对一个给定操作所允许的返回值。
In recent years, development environments began taking even more advantage of the information provided by the compile cycle and static typing.
最近几年来,开发环境开始更好地利用编译循环和静态类型提供的信息。
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.
许多开发者发现静态语言太过冗长,抱怨静态类型是冗长的元凶,而事实上真正的原因是缺少类型推断。
They have some of the best development tools in the world with capabilities, such as code completion and refactoring, that lean heavily on static typing.
他们有最好的开发工具,这些工具带有代码完成和重构等功能,这些都倾向于静态类型。
Also, static typing provides more information for tools such as ides, allowing features such as better code completion. However, static typing has several drawbacks.
而且静态类型还可以为诸如ide这样的工具提供更多信息,带来其他一些特性,比如更好的代码完成功能。
This affords you enormous flexibility, and can greatly simplify your code, but it does come with a significant drawback: Static typing is not maintained for these operations.
这给你带来了巨大的灵活性,并能极大程度地精简代码,但它伴随着一个巨大的缺点——不会为这些操作维护静态类型。
Haskell is quite possibly the most extremely limiting language in common use: there is one way to do everything, mathematically pure functional programming. You have strong, expressive static typing.
通常情况下,Haskell可能是限制最严格的语言:一种方式可以做所有的事情,这就是数学上纯函数式语言。
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.
在这三个角度中,静态类型与动态类型对于语言的特征有最大的影响,因此接下来我将重点解释这两种策略各自的优点。
This gives the expressiveness of duck-typing with the safety of static type-checking.
这既给予了动态类型的表达能力又保留了静态类型检查的安全。
They are accustomed to thinking of all semantics in terms of the primitive axioms that make up the static data typing of mainstream languages and database systems.
他们习惯于按照组成主流源和数据库系统静态数据类型化的最初设想来思考所有的语义。
The typing model is static, and many say that the performance is even better than C++'s (see Resources).
其类型模型是静态的,很多人说它的性能甚至比 C++ 的性能还好(参见 参考资料)。
The typing model is static, and many say that the performance is even better than C++'s (see Resources).
其类型模型是静态的,很多人说它的性能甚至比 C++ 的性能还好(参见 参考资料)。
应用推荐