Super-dee-duper D features

Bill Baxter dnewsgroup at billbaxter.com
Wed Feb 14 12:13:09 PST 2007


Nicolai Waniek wrote:
> 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. 

Bleh.  Not cross-platform.

> You may even add your DLLs to your EXE and unwrap
> them at runtime ;)

Not sure what you mean by that.  But how am I going to create the DLL in 
the first place?  Anyway, anything involving dynamic libraries opens up 
the platform-specific can of worms.

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

Ok, I won't.  But I may end up in the pits carrying only my steering 
wheel a few times on the way to figuring out what "over-use" means.  ;-)

--bb



More information about the Digitalmars-d mailing list