Hallo, Miller Puckette hat gesagt: // Miller Puckette wrote:
I think I have an adequate way to deal with non-list messages; they're converted to lists on input, and the "list trim" object can be used to explicitly convert back.
[list trim] sounds like a very good idea. I made a little check and replaced all [prepend]s in Memento with [list prepend] and [list trim] and it's working very well in a short test. As I will need the prepend/trim combination several times, this is ideally solved with a little abstraction.
I still think it's better style to use "true" lists wherever possible, but this will probably never find general agreement.
One reason I found for needing "false" lists in Memento is because I dynamically generate messages for other selectors. For example the pool external, which stores key/value pairs, requires a message like "set a 1" in its first inlet to store a value "1" at key "a". Using "list set a 1" in this case does not work. An even simpler example might be to generate a "set 42" message to set a float atom. In this case, "list set 42" also will not set the float atom to 42. However with [list trim] this can be made to work. (Of course this example is rather academic.)
My only advice is that, if you want to use non-list messages, just never, ever name a file "bang"!
Hhm, not that I would want to do that, but why is that so? And what would happen?
Ciao