静态/动态与强/弱 [英] Static/Dynamic vs Strong/Weak

查看:109
本文介绍了静态/动态与强/弱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到这些术语在编程中无处不在,并且我对它们的含义有一个模糊的概念.搜索显示我实际上已经在整个堆栈溢出中询问了此类问题.据我所知,语言中的静态/动态键入与强/弱键入有细微的区别,但是这种差异是我难以理解的.不同的来源似乎使用不同的含义,甚至可以互换使用这些术语.我找不到某个地方可以同时讨论这两者,并能真正说明两者之间的区别.最好的是,如果有人可以在这里为我和世界其他地方清楚地说明这一点.

I see these terms bandied around all over the place in programming and I have a vague notion of what they mean. A search shows me that such things have been asked all over stack overflow in fact. As far as I'm aware Static/Dynamic typing in languages is subtly different to Strong/Weak typing but what that difference is eludes me. Different sources seem to use different meanings or even use the terms interchangeably. I can't find somewhere that talks about both and actually spells out the difference. What would be nice is if someone could please spell this out clearly here for me and the rest of the world.

推荐答案

  • 静态/动态键入何时获取类型信息有关(无论是在编译时还是在运行时)

    • Static/Dynamic Typing is about when type information is acquired (Either at compile time or at runtime)

      强/弱键入严格区分类型(例如,该语言是否尝试从字符串到数字进行隐式转换)有关.

    • p>

      有关详细信息,请参见维基页面.

      See the wiki-page for more detailed information.

      这篇关于静态/动态与强/弱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆