lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Well, I like encapsulation.  #include <stdlib.h>
implies check all default paths for the lib.  

I'd rather not have this "leak" in my 
include system.  In dealing with env's
like MSDev - you really can never be sure
where this stuff is coming from unless you
isolate it.

Just a bit o convenience and clarity.

Regards,
Jim




-----Original Message-----
From: Paul Bleisch [mailto:pbleisch@digitalanvil.com]
Sent: Wednesday, May 31, 2000 3:22 PM
To: Multiple recipients of list
Subject: RE: some portability suggestions


> -----Original Message-----
> From: Jim Mathies [mailto:Jim@mathies.com]
> Subject: some portability suggestions
> 
> 2) wrap your standard includes in custom .h includes:
> 
> instead of 
> 
> #include <stdlib.h>
> 
> have
> 
> #include <lua_stdlib.h>
> 
> and in lua_stdlib.h you would have the default
> include #include <stdlib.h>.
> 
> With this, i have complete control over the linked 
> libs in my project. 
> 
> I can then override the default stdlib.h include
> and use my own custom versions of these libraries,
> which are smaller, cheaper, and faster than the default.

While I'm not arguing the usefulness of this in general, why
can't you just override the default stdlib.h as it is now?
It should not matter from which file it is included from.

Paul