Differences between dynamic and static languages

Source: Internet
Author: User

I have learned python over the past few days. I didn't have much or a deep understanding of the concept of "Dynamic Language". Today I accidentally saw a blog post. I finally understood it and summarized it for future reference:

 

Definition:

Dynamic Language:

Check the language of the data type during the program running. This type of language is used for programming. Instead of specifying a type for a variable, the data type is obtained when values are assigned. For example, Python and Ruby are typical dynamic language. For example:

X = 12 print x

The variable X in the above Code does not specify its type


Static language:

On the contrary, the static type language checks the type before compiling. When writing code, each declared variable must specify a type. Such as Java, C #, C, and C ++. For example:

Public int add (int A, int B) {return a + B ;}

 

Dynamic Programming Language:

Dynamic Programming Language (Dynamic Programming Language) indicates that the structure of the data type can be changed during the program running, and the object functions and variables can be modified and deleted. For example, javascr into pT is a language like Ruby and python. C ++ and Java do not belong to this type of language. Of course, the static programming language cannot change the structure during runtime.

 

Differences between dynamic and static languages

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.