func (reg *TypeRegistry) CreateNamedType(name string) *gen.ObjectDataType {
	goName := toGoTypeName(name)
	obj := gen.ObjectDataType{TypeName: goName}
	if _, ok := reg.NamedTypes[goName]; ok {
		panic("BUG: Can't create two named types with same name....")
	}
	reg.NamedTypes[goName] = &obj
	return &obj
}
func (reg *TypeRegistry) CreateNamedType(name string) *gen.ObjectDataType {
	goName := toGoTypeName(name)
	obj := gen.ObjectDataType{TypeName: goName}
	if _, ok := reg.NamedTypes[goName]; ok {
		panic("BUG: Can't create two named types with same name....")
	}
	reg.NamedTypes[goName] = &obj
	return &obj
}
// CreateNamedType returns a new type given a name, the name must be unique.