Comparison of C ++, JavaC #

zhaozj2021-02-11  192

1. About cross-platform problems.

I didn't go deep into the vacation, just talk about my feelings, I feel that Java / C # cross-platform is actually a smart scam. Because their cross-platform is still supported by a manufacturer or factory alliance, this platform is just through the "soft platform" that sets an interface on different "hard platform", this is spanning. "Hard platform", the actual "soft platform" limit is still unable to span; or if the manufacturer does not produce a "hard platform" "soft platform" that "hard platform" you can't go up. The real cross-platform technology is the interconnected "htm / xml", which is currently unable to comply with the standards who have to comply with their own.

Second, about pointer problems.

C # / Java borrowed C , but removed C double-edged sword - pointer (of course, not completely removed, in some form or it can be used in use). Therefore, the advantages and disadvantages of C # / Java, C often spread around the pointer, "use C # / JAVA, or C " for many C / C programmers, like Hamlet's "survival, or death"踌躇 踌躇. In fact, the use of pointers, its essence is the distribution of memory, and the issue of access and release rights will be mastered.

Using the pointer, the programmer is assigned by the programmer, accesses the memory, and the operation is clearly free of the additional processing steps directly. The execution efficiency of the program is high, but if the programmer forgets the release of memory or releases the memory, it will be An unpredictable problem, and this problem is often more serious.

Do not use the pointer, does not mean the allocation of memory, access and release do not have to be processed, just these works are completed by the general "memory manager" generated by the compiler, so the program is executed, and additional memory management action must be added. Therefore, the execution efficiency has decreased relative to the upper. Since the operation of the Memory Manager is based on the comparative and perfect memory management mechanism based on industry professionals, the safety is high. However, in fact, this security is not 100% due to memory distribution, access, use, and release. In other words, the guarantee is responsible for "other people". In this case, once there is a problem, you can't check the problem, or if you find the problem, you can't correct it.

Ok, regarding the pointer, one is 100% efficiency, 60% of security, 100% freedom, 60% efficiency, 99% security, 100% shackles, you choose. I want to say "master", self-confidence, stubborn, and choose a pointer is the decision of their freedom and adventure spirit.

"It is life, it is dead - this is a question worth considering." - But don't lose your ability.

转载请注明原文地址:https://www.9cbs.com/read-4167.html

New Post(0)