I don't think I like how I can't change any of the constants without going into the library and changing it. If I want something completely customizable, I guess I'd have to copy/paste the library into my project where I can change things without changing everything else using the framework.
// the library's _constants.dm:#ifndef PROJECT_1Constants var const // the library's default definitions#endif#ifdef PROJECT_1Constants var const // the constants for Project 1#endif
Yeah, I've done that #define thing before. It gets overwritten when you update the library, though.
object var/global/const value = 5#define access(O, V) access__(O, #V)proc access__(objectType, varName) var/global/list/accessObjs = new var/A = locate(objectType) if (isnull(A)) A = new objectType accessObjs += A return A:vars[varName]client verb Test() src << access(/object, value)
EDIT: Also, sorry for being off-topic in your thread.
That's static code of course, though, and well worth the compile-time type-safety it provides. Doubly so if you have lots of them (as that implies a much larger project, that is more time-consuming to test).
Given the choice between having the compiler confirm basic stuff like typos, and me having to confirm that myself through run-time testing, I'd gladly let the compiler do it.