"Adam D. Ruppe" <destructiona...@gmail.com> wrote in message news:vuegxcpcbsefvmjdq...@forum.dlang.org... > On Wednesday, 21 March 2012 at 21:01:10 UTC, Kapps wrote: >> On the topic of import, mixin imports are something that I believe will >> eventually become a great deal more popular than they are today. > > I use a *lot* of import() (one of my work projects imports() > about 140 files!) but I fairly rarely use mixin with it. > > What I love about it is simply having a one-piece > executable. All your default data is right there. Deployment > is easy. If replacement files exist at runtime, you might > use them, but if not, you always have a default built in! > > > It is much easier than external resource files, and being > able to process is a nice win.
Yea. It especially would have been great back when I was doing GBA homebrew. With that stuff having been in C/C++, just to include *any* real binary data, we had to use external tools (as a pre-compilation build step) to convert the binary data files into C files that contained "char myData[] = [0x01, 0x5B, 0xFF, 0x80, ...];" (or something like that - my C muscles have atrophied). And then later on someone made sort of a mini file-system where you could add data to a ROM image and then query/access it from your code in the ROM. If we had been doing things in D, we could all have just typed import("myData.dat") and been *done*. None of those extra tools or MIME-like-bloating^H^H^H^H^H^H^H^Hencoding bullshit.