C/C++是弱类型,并且是静态类型,因为可以容忍隐式类型转换,并且可以进行强制类型转换,然后编译的时候就已经直到变量的类型,所以是静态类型(类型错误引发的是语法错误)

python是动态类型,强类型,偏向于不容忍隐式类型转换。

wiki上关于强类型:
Java, Pascal, Ada and C require all variables to have a declared type, and support the use of explicit casts of arithmetic values to other arithmetic types. Java, C#, Ada and Pascal are sometimes said to be more strongly typed than C, a claim that is probably based on the fact that C supports more kinds of implicit conversions, and C also allows pointer values to be explicitly cast while Java and Pascal do not. Java itself may be considered more strongly typed than Pascal as manners of evading the static type system in Java are controlled by the Java virtual machine’s type system**. C# and VB.NET are similar to Java in that respect**, though they allow disabling of dynamic type checking by explicitly putting code segments in an “unsafe context”. Pascal’s type system has been described as “too strong”, because the size of an array or string is part of its type, making some programming tasks very difficult.[7]

Smalltalk, Perl, Ruby, Python, and Self are all “strongly typed” in the sense that typing errors are prevented at runtime and they do little implicit type conversion, but these languages make no use of static type checking: the compiler does not check or enforce type constraint rules. The term duck typing is now used to describe the dynamic typing paradigm used by the languages in this group.

The Lisp family of languages are all “strongly typed” in the sense that typing errors are prevented at runtime. Some Lisp dialects like Common Lisp or Clojure do support various forms of type declarations[8] and some compilers (CMUCL[9] and related) use these declarations together with type inference to enable various optimizations and also limited forms of compile time type checks.
Standard ML, F#, OCaml, Haskell, and Rust are statically type-checked, but the compiler automatically infers a precise type for most values.

Visual Basic is a hybrid language. In addition to variables with declared types, it is also possible to declare a variable of “Variant” data type that can store data of any type. Its implicit casts are fairly liberal where, for example, one can sum string variants and pass the result into an integer variable. Visual Basic is weakly typed.

Assembly language and Forth have been said to be untyped. There is no type checking; it is up to the programmer to ensure that data given to functions is of the appropriate type. Any type conversion required is explicit.

wiki 上的 Type system

静态类型/动态类型/强类型/弱类型相关推荐

  1. 开发语言的静态/动态,强类型/弱类型之分

    目录 概念定义 静态类型语言 优势 劣势 动态类型语言 优势 劣势 强类型语言 弱类型语言 如何选择 语言类型图 之前同事每次跟我提起他学习了某个语言,并介绍这个语言很棒时,开头都会跟我说这个语言是什 ...

  2. 静态 动态 强类型 弱类型语言的区别

    原文:http://www.zhihu.com/question/19918532 类型系统的一些概念,众说纷纭,使用上也比较乱.有些东西,甚至不好严格定义.以下算学术界的一种相对"严格&q ...

  3. java 强类型 弱类型_强类型,弱类型,静态类型,动态类型的区别

    强.弱类型 强类型strongly typed: 如果一种语言的所有程序都是well behaved--即不可能出现forbidden behaviors,则该语言为strongly typed. 弱 ...

  4. python 强类型 弱类型_Python到底是强类型语言还是弱类型语言

    0.前言 有读者跟我讨论起了另一个关于类型的问题,但是,我们很快就出现了重大分歧. 我们主要的分歧就在于:Python 到底是不是强类型语言?我认为是,而他认为不是. 他写了一篇很长的文章<谁告 ...

  5. 计算机语言的分类:编译型/解释型、动态类型/静态类型、强类型/弱类型

    参考: 计算机语言:编译型/解释型.动态语言/静态语言.强类型语言/弱类型语言 编译型语言.解释型语言.静态类型语言.动态类型语言概念与区别 编程语言傻傻分不清:弱类型.强类型.动态类型.静态类型 1 ...

  6. python 强类型 弱类型_强类型、弱类型

    什么是强类型,什么是弱类型? 之前一直写的OC语言,在自己的意识中,所有数据类型是定义好的,如果改变数据的类型必须进行强制类型转换. 但是接触了JavaScript后发现,一个变量,可以是字符串,也可 ...

  7. 编译语言与解释语言,动态与静态,以及强类型和弱类型的区别

    编译和解释的区别是什什么? 编译器是把源程序的每一条语句都编译成机器语言,并保存成二进制文件,这样运行时计算机 可以直接以机器语言来运行此程序,速度很快; 而解释器则是只在执行程序时,才一条一条的解释 ...

  8. python是动态语言还是静态语言?强类型语言还是弱类型语言

    首先要清楚静态类型语言和动态类型语言的判别的标准 定义:如果类型检查发生在编译阶段(compile time),那么是静态类型语言(statically typed languages)中,相反的,如 ...

  9. 弱类型、强类型、动态类型、静态类型语言的区别是什么?

    无类型: 汇编 弱类型.静态类型 : C/C++ 弱类型.动态类型检查: Perl/PHP 强类型.静态类型检查 :Java/C# 强类型.动态类型检查 :Python, Scheme 静态显式类型 ...

最新文章

  1. 前端小哥玩HTML复选框上瘾,能画logo做视频,还开源成JS库
  2. HTML5之webSocket使用
  3. Sentinel(十)之系统自适应限流
  4. 【汇编语言】状态标志符(CF/OF/SF/ZF)在运算(ADD/SUB/ADC/SBB)过程中的响应变化
  5. Android端发送字符到Wed端,android应用端向web端获取字符串。
  6. shell编写mysql全备和增备脚本_基于mysqldump编写自动全备增备的shell脚本
  7. iPhone开发视频教程 Objective-C部分 (51课时)
  8. Sublime Text 3使用技巧总结--快捷键及常用插件
  9. 由查找算法工程的类图分析组合模式
  10. 涨跌停计算器_股票涨跌停计算器
  11. 【技术帖】真正解决反恐精英csOL:StartService 0X204 为防御非法程序driver
  12. win10计算机护眼,win10系统开启电脑护眼的操作方法
  13. 应用程序错误(0xc0000135)
  14. 信号的平均功率与均方值
  15. [置顶] 程序员面试之道(《程序员面试笔试宝典》)之程序员如何保持身心健康?
  16. mysql 参数 分隔符_mysqldump命令备份多个数据库时,参数之间分隔符是
  17. JS 正则表达式获取匹配内容
  18. linux文件目录详解
  19. 小汪汪服务器不稳定,小汪汪登陆不上问题解决办法 游戏进不去怎么解决
  20. 2019武汉理工大学计算机考研经验分享

热门文章

  1. 高铁服务要学的计算机是什么,高铁乘务员需要具备那些知识
  2. 基于RFC2617的身份认证
  3. 用Python写一个自动关机程序
  4. What!吴恩达要参加美国大选?带你一起用人脸识别技术看看真的是吴恩达吗?
  5. Unity 2D入门基础教程
  6. xp系统如何开启dhcp服务器,WinXP系统下怎么配置DHCP?WindowsXP系统配置DHCP的方法...
  7. js实现图片在浏览器进行预览
  8. Java增强for循环foreach
  9. [C语言指针练习二]字符串逆序,使用指针,写一个函数,可以逆序字符串的内容。
  10. rc4加密问题漏洞修复_「ssl漏洞」网站SSL安全漏洞修复指南