On 2/06/2015 8:54 p.m., ketmar wrote:
On Mon, 01 Jun 2015 16:05:17 -0400, Steven Schveighoffer wrote:
A protocol to be used between dmd and dub (or any other package fetcher)
would be a good first step.
that was the thing i once proposed. see, we have a powerful scripting
language inside DMD: D! yet we never used all it's power to do something
really exciting -- like, for example, preparing command lines for
external package fetching tool and parsing the answers. instead of
providing a simple module for that, it all goes to be hardcoded.
i extended CTFE engine with simple file i/o functions and "system" call
with config-defined executables (something like sudoers list) just to see
if it will be usable. and it's surprisingly fun even with all the limits
and without hooks for module imports and so on.
this system can be extended to allow writing arbitrary subcommands (like
git). just import the corresponding subcommand module, if any, and CTFE
it's invocation point. bingo! the system that can be extended without
recompiling the compiler. and user can add subcommands on per-project
base!
sadly, this seems to get no "wow!"s. :-(
I say wow.
Okay not really I know it is possible and not all the hard.
Personally I think it is a rather an awesome possibility.
Really what I want is to add the ability to add on the compiler side
symbols that can be CTFE'd.
Registered at start of runtime.
Add on shared library support and wamo. You can add stuff like this
pretty arbitrary :)