Why does Windows Phone 7 not support C ++?

Source: Internet
Author: User

// ================================================ ====================================
// Title:
// Why does Windows Phone 7 not support C ++?
// Author:
// Norains
// Date:
// Thursday 5-August-2011
// Environment:
// Windows Phone 7
// ================================================ ====================================

 

When I first learned that Windows Phone 7 does not support C ++ development, I was shocked and puzzled. However, over time, I finally understood Microsoft's original intention: If Windows Phone 7 supports C ++ development, it may be a major obstacle to promotion!

 

Does it sound like you hear it? But before talking about this question, let's first ask a few questions:

Do you know the number of CPU architectures? Have you heard of the terms arm, x86, MIPS, and SH3? Do you know the number of arm instruction sets? Do you know what arm instruction set is used on your mobile phone?

 

I think, evenProgramIf not embedded, these questions may not be answered completely correctly. Then, how can we be the most common user to understand this?

 

There may be a lot of questions about the relationship between this and common users. In fact, the relationship is huge. For example, suppose there is a Windows Phone 7 written in C ++. The simplest thing is to output "Hello World !" Put the program on a mobile phone that runs Windows Phone 7. Do you want to run it normally?

 

The answer is: Not necessarily. We know that the compiled C ++ program is binary.CodeAnd the binary code is related to the CPU architecture. Even if you compile a Windows Phone 7 program, but the instruction set is arm, you cannot run this program on the cpu Of the mips architecture!

 

It does not sound so serious. We just need to select the corresponding CPU architecture? It seems so. But let's look at the problem from another perspective. Isn't Apple's online App Store very popular now? Obviously, Microsoft must be very jealous of this. So, if Microsoft wants to make a similar online App Store, what are the requirements for apps stored in the store? Is the same program divided into arm, MIPS, and x86 versions? This is because the program compiled with C ++ can be placed on the corresponding CPU!

 

Isn't this problem serious enough? Try to answer a question: what kind of instruction set does the mobile phone use? It is estimated that if the host is not detached, it is not an internal engineer. It is estimated that few people can answer the question accurately. What's more, common users? If a common user downloads a program compiled in C ++ and finds that the program cannot run, do you think they will take the time to understand what the CPU architecture is and then download the corresponding version? It is estimated that he will say: nnd, this program cannot be used, this Windows Phone 7 is really bad!

 

Why object-C can be used on the iPhone? The reason is very simple: because the iPhone hardware is designed by Apple, they only use a CPU architecture and have no branches. Therefore, for the iPhone, there is no architecture difference at all. This is not the case for Microsoft. Microsoft only provides the operating system, that is, the software layer. For the hardware, Microsoft is uncontrollable. for the sales of Windows Phone 7, it is absolutely impossible to say that it is limited to a specific architecture, therefore, the hardware is in full bloom.

 

However, if Microsoft really wants to create an online App Store, it must block this difference from application programmers and users. C ++ is related to the CPU architecture, so it cannot be competent. Only. Net can assume this responsibility. C #, as a pioneer in. net, naturally has no hesitation.

 

The same is true for Google Android. Google cannot control the hardware it uses and is not limited to a specific architecture. Therefore, it must also use a language that can block this difference. Select Microsoft. NET? If this is the case, it is estimated that the game has been kicked. Then, only Java is available.

 

To put it simply, if a company can control the operating system and product hardware, the first choice is C/C ++ (or object-c), because the running efficiency is there, for example, apple. If a company only provides operating systems and cannot control hardware, it can only discard efficiency to avoid hardware differences and use virtual machine-based languages, such as Microsoft and Google.

 

At the end of this article, we will discuss windows. Because the message has been released, it is said that Windows 8 will not be limited to the X86 architecture, but also be able to run on arm. If Microsoft succeeds at that time, does it mean that the application layer development of Windows 8 will be C?

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.