On Dec 16, 2005, at 3:48 AM, Frank Barknecht wrote:
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote:
I have to say that I like the A_FLOAT, etc names better (you can probably guess why). Code should document itself. "pffsFFS" is easy to skim over while "A_POINTER, A_FLOAT, A_FLOAT, A_SYMBOL, A_DEFFLOAT, A_DEFFLOAT, A_DEFSYMBOL" is very clear. I won't miss the A_NULL though.
Maybe a "best of both worlds" approach could be used, that allows both long names and short aliases for methods, that accept veryveryverymany arguments and thus aren't readable with A_POINTER,... anyways.
I could think of using a field delimiter like ":" in the argument type string: "p:f:f:s" or "A_POINTER:A_FLOAT:A_FLOAT:A_SYMBOL" then could be allowed. And we would get rid of A_NULL in both cases.
I think that this is readable:
class_addmethod(test_class, (t_method) test_start, gensym("start"), A_DEFSYMBOL, A_POINTER, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, A_NULL);
You can't get longer than that since then an A_GIMME needs to be used.
.hc
________________________________________________________________________ ____
"Information wants to be free." -Stewart Brand