Another way to improve debugability is to at least provide a stack dump when an error is encountered. Variables which are used in Glish functions are global by default and to make them local they must be explicitly declared as local . This should be changed so that variables are local by default . This is a basic principle of scoping which Glish should be changed to follow. Having the default scope be the most local scope available will reduce programmer error and highlight those places where a function is using global variables.
Object oriented programming is a very useful way to encapsulate reusable pieces of a system.
While Glish shouldn't be turned into an object oriented system, capabilities should be added which facilitate object oriented programming . While Glish values could be used as the basis for objects in Glish given the existence of attributes, the granularity values is probably too small a granularity. Packages, once implemented, should form a more appropriate granularity for object oriented development than values. Care must be exercised in adding object oriented features as a result of the interactive nature of Glish. In this same vein, one of the nice features of object oriented languages is the notion of destructors.