Current way of passing options to PS programs ( -d -s ) doesn't check the name of the defined variable and its value. This is a source of easily preventable user errors and support costs. GS can define new options ( or reuse -D -S ) to reject unknown variable names and validate the values. This can be easily done by running a program associated with the name from a spacial dictionary.
In the existing command line processing, the parameters for devices are open ended this would be difficult or impossible. We have talked about coming up with a new, better command line handler where we could organize the device parameters separate from parameters that are intended to affect the interpreter. When we do this, the checking and error messages for command line options for 'ngs' can take this into account.
'ngs' may happen even after PostScript debugger. The proposed approach can be implemented in days and cover all the supported devices. The old -d -s should not be changed or removed.
I agree with Alex that a dictionary of handlers would work excellent, but I do not agree that it's a work for days. The most complicated problem here is that PS code handles parameters in Postscript, and devices do in C. To install a handler from C we either need a special interface for devices to add PS code (which won't work for the PCL interpreter), or a way for devices to associate a C code to the parameter handler in Postscript (which again won't work for PCL interperetr). Thus Ray's suggestion "organize the device parameters separate from parameters that are intended to affect the interpreter" becomes the first step. I guess it should be something like this : -sDEVICE=pdfwrite(EmbedAllFonts=false,AlwaysEmbed= [false,/Helvetica],RotatePages=/None) and we get another big problem with the syntax. Thus2 the dictionary of handlers isn't a dictionary, or at least it isn't a Postscript dictionary. It may be a list of [key, procedure] pairs, where 'procedure' is either C code or PS code. If it is a PS code, the argument list processor will implement Postscript callouts. Well, all this may be done in few monthes.
A complete solution may be rather difficult to implement but I still think that a useful partial validation can be done as a week-end hack.
Enhancement still missing in Ghostscript 9.03
After 9 years, I think we should just close this. The thread doesn't contain any real useful suggestions (though there are allusions to some ideas), there isn't a patch and we've managed OK in the interim. If we still want to improve command line processing then someone should take it up as a project.