Java should have object address type

Source: Internet
Author: User

I think Java now needs a type: Object address. This is in C + +. The reasons are:

If the contents of the data as a box of apples or something, then the object reference is a box, then in the method calls, in the current Java system will have to re-use a new box every time to wrap the content, this is an additional consumption. You know, this object reference does not have a fixed-size address record block of memory like a pointer, but is large enough to contain all the content of a specific object type. Such extra consumption will cause the program to crash during the execution of certain purposes, and if you want to avoid it, you will lose the object-oriented feature and not implement the API.

For example, I see the situation caused by this flaw:

+ makes the execution result similar to String.Replace () (not the return result) counterintuitive, such an unavoidable flaw.
+ makes it impossible to build APIs like MP3 resources from the Java language level for nearly 10 years or so, because of the huge amount of extra consumption created in the call of the grassroots resources. This is what the last sentence of the above paragraph describes.

Therefore, I expect the Java development team to be aware of this problem and provide the basic functionality that should not be dug out in the new version.

Java should have object address type

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.