Dynamic Language, static language, how does JVM support dynamic language, and other methods that support dynamic language?

Source: Internet
Author: User

Reprinted please indicate the source: http://blog.csdn.net/rhwstar/archive/2008/05/07/2411569.aspx

I

(1) dynamic type language: a dynamic type language is a language that performs data type checks during runtime. That is to say, when programming in a dynamic type language, you never need to specify a data type for any variable. This language records the data type in the internal part when you assign a value to the variable for the first time. Python and Ruby are typical dynamic language. Other scripting languages, such as VBScript, are dynamic language.

(2) static type language: the static type language is the opposite of the dynamic type language. Its data type is checked during compilation, that is to say, when writing a program, declare the Data Types of all variables. C/C ++ is a typical representative of the static type language, and other static type languages include C # and Java. For the distinction between Dynamic Language and static language, the popular words are static typing when possible and dynamic typing when needed.

 

2. Strong-Type Definition Language and weak-Type Definition Language

(1) Strong-Type Definition Language: language that forces data type definition. That is to say, once a variable is specified with a data type, if it is not forcibly converted, it will always be the data type. For example, if you define an integer variable A, it is impossible for the program to treat a as a string type. A strongly typed language is a type-safe language.

(2) weak type definition language: language in which data types can be ignored. It is opposite to a strongly typed definition language. A variable can assign values of different data types. The speed of a strong-type definition language may be slightly inferior to that of a weak-type definition language, but the rigor of a strong-type definition language can effectively avoid many errors. In addition, there is no connection between "is this language a Dynamic Language" and "is this language a type of security! For example, python is a dynamic language, a strong Type Definition Language (Type-safe language), VBScript is a dynamic language, and a weak Type Definition Language (Type-insecure language ); java is a static language and a strong Type Definition Language (type security language ).

 

3. Dynamic Programming Language: The class structure can be changed during running, and the method attributes can be added/deleted.

Static programming language: non-dynamic language.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.