test content
What is the Arc Client?
Install Arc

Aux Scaling Bug (2/23)

13»

Comments

  • swamarianswamarian Member Posts: 1,506 Arc User

    I suspect that borticus is working with what the system enables him to do here.

    Because if I had to
    ((AuxPower * .005) [b]+ .5)
    
    a third time anywhere, I would try to make it a seperate method and just call it from everywhere I need it. (The constant idea isn't bad either, but if the whole calculation repeats itself, you have to think further). Failing a method, I might do a macro (but I come from the Java/C# world and only later started doing C++, so Macros are still something I don't use all that often.)
    I'd go with an inline function because macros can do unpredictable things. Of course, their engine might be written in C, in which case their options would be very different.
    But some dev remarks in the past suggest that things like powers and items are not "code" in the classic sense, and are more data that is put in a database. It might be very similar and still is a form of programming in the end (even if not everyone would call it that), but this likely means it's something half-way proprietary and not a full blown programming language with all the abilities that would entail..

    I've been involved in a couple of projects that involved domain specific languages. When done well, they really simplify the task at hand, improving developer productivity and reducing the number of bugs. Performance isn't so hot, since you're running everything through an interpreter. If I were tasked with doing something similar, I'd probably look at using a code generator. (Oracle does that with their Pro* C tool which lets you mix SQL with your C/C++ code. Also, PowerBuilder compiles to C code. In both cases, the output's unreadable gibberish.)
Sign In or Register to comment.