Early binding and late binding

Source: Internet
Author: User

It has never been clear about early binding and late binding. After reading the description on w3school, I thought it was simple, clear, and easy to understand.

Binding is a method that combines object interfaces with object instances. Early binding refers to defining its attributes and methods before instantiating an object, so that the compiler or interpretationProgramSwitch machines in advanceCode. In languages such as Java and Visual Basic, with early binding, you can use intelliisense in the development environment (that is, to provide developers with the attribute and method list functions of objects ). Ecmascript is not a strong language and cannot be bound early.

On the other hand, late binding means that the compiler or interpreter does not know the object type before running. Late binding does not require you to check the object type. You only need to check whether the object supports attributes and methods. All variables in ecmascript use the late binding method. In this way, a large number of object operations are allowed without any penalty.

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.