Super-dee-duper D features

Nicolai Waniek no.spam at thank.you
Wed Feb 14 11:58:17 PST 2007


Bill Baxter wrote:
> 
> Maybe that's exactly the point.  You want configuration files that are
> easy to work with for developers, but you do not want end-users mucking
> with them.  Or small scripts that are part of a game engine.  You may
> want them loaded at runtime during development for easy modification,
> but when you ship your game you may prefer to have that script code
> embedded in the .exe where users can't muck with it.
> 
> Another case is where you want to have an all-in-one .exe with a tidy
> install.  If you have external configuration files then you have to
> worry about finding them at runtime and handling the case when you can't
> find them for whatever reason.  Easier to just embed and be done with it.
> 
> I don't think loading data files is a one-size-fits-all issue. Sometimes
> it makes sense to embed.
> 
> On the other hand, that doesn't mean you need import to do it.  You can
> always write an external tool too 'stringify' a data file.  In fact
> that's exactly what I did:
> http://www.dsource.org/projects/luigi/browser/trunk/luigi/wrapres.d
> 
> The new import makes much (but not all) of the functionality of that
> converter unnecessary.
> 
> --bb


You could use ressource files linked to your EXE, so you wouldn't have
to search for a file. You may even add your DLLs to your EXE and unwrap
them at runtime ;)

I think as long as you use the language features in a sane way, it's ok.
Just don't over-use them.



More information about the Digitalmars-d mailing list