WHIM-Outlaw macro definition, use another language to do part of the outer package of C + +

Source: Internet
Author: User


Whim:
In a language to write C + + plug-in, can replace the macro definition,
You can do this by adding specific tags to C + +, such as <javascript></javascript>
The middle code can be translated into C + + code and compiled with the C + + compiler.

Bothered:

1.c++ macro must be anti-slash, and then need a lot of repetitive logic code, the need for macros to reduce the amount of code, to achieve efficient work;

2. If there is a large number of macro code in C + +, it is a bit hard to solve the macro code, so if you can restore the code directly;

The ultimate goal: to reduce the confusion caused by the macro definition of C + +, reduce the number of repetitive code, you can achieve the seemingly callback code, in fact, similar to define after the restoration of the code inside the C + + file.

You can use LUA or JavaScript or go. But it doesn't have to be too complicated.

function has the effect of helping the compiler to work efficiently.

WHIM-Outlaw macro definition, use another language to do part of the outer package of C + +

Related Article

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.