Compile Script to Plugin

Idea created by PeterDoern on Oct 5, 2016
    Active
    Score9
    • Benjamin Fehr
    • PeterDoern
    • intex
    • fmpdude
    • hschlossberg
    • Draco
    • jbante
    • Vincent_L
    • Markus Schneider

    Summary

    Allow developers to save a script or group of scripts as compiled code. Sort of like a native plugin builder.

     

    This could take the form of a "Save Script As..." menu (or "Save Script Folder As.." in the case of a folder of scripts) that would allow the user to name the compiled script and save it as an external file and, optionally, install it in the current file as a plugin.

     

    Once compiled, the script could be distributed and installed as a plugin in any file. If the script took parameters, the developer would simply name it in such a way as to indicate that, e.g. "MyCompiledScript ( param1 ; param2 { ; optionalParam } ).

     

    The usual caveats apply... developers would have to know that explicit references to tables, layouts, etc. would break if the plugin were installed in a file where they weren't available, and build scripts accordingly.

     

     

    Why Important

    I could be wrong, but I imagine that compiling interpreted script steps into machine code would make it execute much faster.

     

     

    Use Cases

    Any situation where:

    • script functionality is well-established and unlikely to change,
    • execution speed is critical,
    • the developer wants to reuse code easily between files,
    • the developer wants to distribute code to others easily and/or without revealing "secret sauce"