Under Review
over 1 year ago

Feature-request: add pre-processor with inline functions to Monkey C

Please consider adding some pre-processor to Monkey C, similar to C.

For example we could have inline functions. It would make developers life much easier: the readability of the code would improve, in many cases the binary size could be decreased  litte-bit.

#inline function myfunc(a) {return App.getApp().getProperty("LeftGoalType") == GOAL_TYPE_FOO || App.getApp().getProperty("RightGoalType") == GOAL_TYPE_FOO;}

or:

#inline myfunc(a) App.getApp().getProperty("LeftGoalType") == GOAL_TYPE_FOO || App.getApp().getProperty("RightGoalType") == GOAL_TYPE_FOO

Parents
  • What is the "selling point" of having a build system written in Rust? Wouldn't it be easier to use Gradle? I guess a Gradle plugin wouldn't be very hard to make, and then we would be a) familiar with it b) able to leverage gradle's strength

Comment
  • What is the "selling point" of having a build system written in Rust? Wouldn't it be easier to use Gradle? I guess a Gradle plugin wouldn't be very hard to make, and then we would be a) familiar with it b) able to leverage gradle's strength

Children
  • and yes, the "selling point" is to provide 1) better project structure, 2) a ton of QoL(Quality of Life) features, and most of all 3) simplicity.

  • Well, Gradle isn't familiar with anything but JVM languages and C++, and also it will be a bit of an overkill. I think making a build system from scratch will be better, because it will fit the CIQ ecosystem better, and it will be easier to control how it works. For now this project is in alpha-beta stage, and I am looking forward to add a lot of good features such as remote dependency repositories, code analysing, code pre-processing, plugins, and much more