View the future of PHP from the design blueprint of ZendEngine2.0

Source: Internet
Author: User
Tags fast web
First of all, some miscellaneous are the original intention of this article. I have been getting the design blueprint document for ZendEngine2.0 for some time (now you can download it from the reference URL ), after reading this article, I was impulsive to write a comment-because the next generation of php (as the mainstream SyntaxHighlighter. all (
   Some Miscellaneous
The first is the original intention of writing this article. I have obtained the design blueprint document for Zend Engine 2.0 for some time (now you can download it from the reference URL ), after reading this article, I was impulsive to write a comment-because the next generation of php is described based on the document (as the mainstream development language) it will be a language that is more in line with the existing object-oriented development habits, at least it will be given more object-oriented features. However, the question that arises is whether php (as the current mainstream development language) is a language with the initial goal of rapid Web development. Is it worth modifying itself in all aspects? This question seems to need some comments to discuss, and I am very willing to put forward my own point of view. However, after some busy things, the impulse was moved back to his stomach a little bit, and I remembered it some time ago. so I read the design blueprint document several times and read this article. (When I first got this English document, I still had the intention to translate this design blueprint document into Chinese, but considering that it was not the final blueprint, second, everyone should cultivate the habit of directly reading the original text. third, translation always inevitably brings some obscure places. However, when writing this article, I decided to translate the article "adventure" once. if you cannot reach your purpose accurately, please correct it .)
  
The second is an explanation of the focus of this article-in this comment, I will mainly comment on the object-oriented features that will be greatly enhanced in the future of php (as the mainstream development language. If you are a developer of php (as the mainstream development language), I guess you should know some object-oriented features in php (as the mainstream development language; however, since php (as the mainstream development language) is used in an "extremely fast development environment" (this is a word I have created myself, it indicates the development of customer-oriented websites. It is characterized by a short construction period and unclear customer requirements ), therefore, there are not many developers and development projects that actually use a large number of their object features. In addition, the existing php (as the mainstream development language) object model is inferior to C ++ and Java, it also limits the use of this feature. However, in the future version of php (as the mainstream development language), the focus of modification is the language-oriented model, which improves many of the bad features of the existing version and adds other features. Therefore, the future of php (as the mainstream development language) is focused on the object-oriented features of php (as the mainstream development language.
  
Well, let's get to the point and look at the new features of Zend Engine 2.0.
  
   Design Blueprint (draft) for Zend Engine 2.0)
From the design blueprint (draft), we can clearly see that the next generation Zend Engine is based on the new object-oriented model. If you have used existing php (as the mainstream development language) 4 object-oriented features, it may feel awkward while finding a little bit of Java or C ++-not only the lack of object-oriented syntax, and sometimes unexpected running results-all this is because the existing support for php (as the mainstream development language) in Zend Engine 1.0, 4 is caused by a less elegant object-oriented model.
  
To put it simply, the next generation of Zend Engine will move closer to Java and draw a lot from its object-oriented model. The improved features can be divided into three types: the first type is the improvement and enhancement of the existing object-oriented model, including the definition of the builder and the destructor, added object-oriented features such as private member variables, static member variables, multi-inheritance, and overload. The second type is modification and addition and deletion of control processes, for example, a try/catch/throw violation handling mechanism is added; the third type is about function modification and addition/deletion, for example, adding a function to the string offset. (For details about each type of improvement, see the documents listed in references .) From this we can see that through the first and second types of improvements, php (as the mainstream development language) is gradually improving itself into a language with object-oriented features.
  
   However, the problem arises exactly here:
In a positive aspect, today's programming world welcomes languages with object-oriented features (even though the language itself is not built on the object-oriented basis, you can also add defined objects to prevent the language from falling behind the trend)-In this sense, Zend Engine 2.0 makes php (as the mainstream development language) the support for object-oriented will change from the current tentative contact to the full support of the future, which seems to be more in line with the development trend of programming languages. In addition, when building enterprise-level applications (which is also widely criticized by php as the mainstream development language), using object-oriented modeling and implementation is already a de facto standard, this improvement of php (as the mainstream development language) may cater to this need and solve the weakness of the language in this aspect.
In the negative aspect, it seems meaningless to provide developers with a new version of php similar to Java (as the mainstream development language. Php (as the mainstream development language) is widely used, except for open source code and cross-platform, it is also important to adapt to the simple and fast web programming features of Internet sites. Extremely short learning time, friendly language style (especially if you are familiar with C), and a large number of extended class library functions are enough to prove its strength; however, if we transform the next version of such a language into an object-oriented language, it will not only make a large number of original developers at a loss in a short time, and it is not conducive to attracting new developers to join. since there is a language like Java, why should we learn php (as the mainstream development 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.