Easy User code injection
Patience via Digitalmars-d
digitalmars-d at puremagic.com
Sun Apr 3 13:51:47 PDT 2016
One problem with many applications is they are static once
compiled in the following sense:
There are apps that have certain behaviors that may be incomplete
are undesirable. Usually it could be that the designers used a
hard coded value for something when it would be better to have
made that variable a "setting". The problem is, the only way to
change this is to re-compile the code.
It would be extremely beneficial if the user themselves could
modify the code. Since they obviously can't recompile without the
source, i.e. all commercial apps, they have to ask the developers
for the enhancement or fix.
The developers could write a complex object oriented design and
allow the user create objects that modify existing objects and so
forth(a plugin like system) but that creates way more complexity
than required for usually simple modifications(a few lines of
code).
Does anyone see how it could be possible to make an efficient way
in D applications to allow for "user modifications" almost as
equivalent to having the source?
Code injection/Hooks is probably the way to go about this but one
has to worry about performance in some cases, the implementation
details in D, and how to present this to the user in the best
possible way.
A "scripting" like interface would probably be required but not
necessary as we could allow the user to create the code somewhere
else.
Another idea:
Suppose the source code is internally encrypted and when the user
wants to modify a part of it, the application can recompile that
part of the code and replace the original. Doesn't seem like a
great idea but probably only slightly worse than reverse
engineering the binary itself.
More information about the Digitalmars-d
mailing list