On Wed, 2004-02-25 at 10:07, Tels wrote: > However, exist is not always neccessary (I formerly thought it is):
Hmm, you keep learning things. Still, it's necessary in this case, as it checks for the existence of a module within a subsystem, not the truth. See below though. > The code also has the problem that different subsystems might share the same > key, and thus advertise that somethin is there even though it isn't. Why > isnt sdl_config just a list (hash) of supported/unsupported things instead > a nested one? This was the simplest approach I found. I didn't have to write my own serializer or deserializer, which is nice, as trying to get the quoting right in autogenerated code truly sucks. Writing an SDL::OpenGL::Config would allow a flattened structure, which'd be nice. That's likely the best solution. > This is not a place where you should optimize code and thus introduce bugs > in the code. :) We're not discussing a bug in the original config code. -- c