O que é uma linguagem de programação fracamente tipada

Web 2021-08-18 19:37:58 1 7,223

Linguagens de programação fracamente tipadas também são chamadas de linguagens de definição fracamente tipadas, em oposição às definições fortemente tipadas. Como JavaScript, vb, php, etc. são linguagens de digitação fraca. As principais diferenças entre as linguagens com tipagem fraca e as linguagens com tipagem forte são as seguintes.

(1) Linguagens mal digitadas, as variáveis ​​não são divididas em vários tipos, as declarações de variáveis ​​usam a palavra-chave var, que determinará automaticamente o tipo e converterá ao atribuir um valor a uma variável; linguagens fortemente tipadas, há muitos tipos de variáveis ​​e variáveis ​​só podem aceitar e O mesmo tipo de dados.

(2) Linguagens mal tipadas, nenhuma conversão explícita entre variáveis ​​é necessária. Por exemplo, subtraia a string 12 e o inteiro 3 para obter o valor 9, sem conversão explícita.


Os seus comentários

Already have 1 Article answer
  • website 1楼
    Thank you for all your work on this site. Gloria enjoys carrying out investigation and it's really easy to understand why. All of us hear all about the lively mode you convey vital things through this website and cause response from others about this point then our own child is without a doubt learning a lot. Enjoy the remaining portion of the new year. You're the one carrying out a powerful job.
    发布于 2021/12/16 22:06