Technical "positions"

Source: Internet
Author: User

I haven't updated the blog here for a long time.

Recently, some changes have taken place in my tool chain. Here is a description:

Previously, the luajit/C ++ combination I used was suspended. Cause: Although luajit has excellent performance, many times,Just do it fast enough, not necessarily the fastest.

C ++ is really amazing.Mental baggage, Especially during design. Although boost simplifies a lot of wheel-building work, compilation is too slow. There is no great help for a good CPU.

Currently, it is mainly used in the python tool chain, including some rare advanced modules in China. I will not disclose the specific usage here.

Here, the layers of tools, I think,

The idea of C ++/Java is to create a common language and then use many libraries for extension.

However, this idea is very limited. The main problem is that the design of a unified large language is not that simple. A large language is always unsuitable.

This is the problem that I originally wanted to use Lua/luajit to help c ++ solve.

However, I slowly discovered that Lua's embarrassing position lies in that although luajit is one of the fastest JIT engines, luajit is connected to C ++:

1) Missing Library

2) lack of language-level design support, or support for excessive design at the language level (FP/OO/ob...), leading to a huge design burden, making it difficult for beginnersProgramStaff usage

3) There is no goodCommunityThe leading figure in the Lua community insisted that Lua is not suitable for general languages and left Lua's Web server project dead.

4) there is no unified Abi (Abstract binary Interface), which also leads to lack of libraries and ununity of the community.

======================================

Reason for choosing Python:

1) multiple databases

2) Easy design, easy for junior programmers to master

3) Active Communities

4) recent breakthroughs in several important projects on inter-language cooperation have greatly simplified cooperation between C/C ++ libraries and python.

5) coroutine support (this was originally a weakness of Python)

6) due to the progress of recent projects, source code protection for python is no longer a problem.

----------------------------------------------------------------------------

This also means that I have completely reversed the "positions" of dynamic and static languages. Previously, luajit was driven by C/C ++ as the core. Lua is only used as an extension. That is, "standing up and down ".

Currently, it is mainly python. When it is extremely necessary, we should consider replacing the hotspot module with C/C ++ to improve performance. That is, the "moving up and down" position.

 

Writing these ideas is not boring. I just want to say that there is a hammer in my hand that doesn't make everything in the world a nail.

Proper tools are the most important thing to do.

In some cases, the luajit/C combination still has incomparable advantages.

The ability to differentiate these and make appropriate Technical Selections based on different project conditions is my tireless pursuit.

 

 

 

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.