Hi Doug,
My actual code is a little off, I should have written...
(setq bob (quote Iam))
(read (strcat (vl-symbol-name bob) " cool"))
Although he's not using the way I thought he might be, there is a use for working with symbol names instead of strings, perhaps for efficiency... For example, if you want to access a variable's value and set a value to it later...
(setq var 0.125)
(defun func (symbol / )
(princ "\npre value:")(princ (vl-symbol-value symbol))
(set symbol 0.25)
(princ "\npost value:")(princ (vl-symbol-value symbol))
)
(func 'var)
returns...
"pre value: 0.125"
"post value: 0.25"
Of course, like I think you were suggesting, you could just use a string and read it into a symbol name as well. But it makes things a little easier and cleaner to pass the variable itself with a qoute then converted into a string.
But I know there are useful uses for both ways. For instance, if you have a list of tile names in a dialog box and you want to assign a default to each one based on what the user entered last, you could use the tile string names as the variable names for their own default values. And then later populate the dialog with the defaults stored in the variable names. So I don't think it matters so much, just what the current application is.
Devin