On 2/27/22 10:05, Alexandre Torres Porres wrote:
Em dom., 27 de fev. de 2022 às 05:26, IOhannes m zmölnig zmoelnig@iem.at escreveu:
Many objects in Pd are coded in a way to reject creation arguments in the wrong order. The bug would be that it allows it.
that's typically not how it works. see Postel's law.
flags are just a general expression of "named arguments" (where you specify the meaning of a value along with the value; which is useful if you have many and/or non-mandatory arguments),
in general, flags are most useful for cmdline applications. so i think we should check how flags are andled there.
- They start with "-".
in *general* i think it is safe to say that flags start with some common prefix. the actual prefix may vary based on the ecosystem, with *plenty* of exceptions.
"-" for short-name (single-character) flags (e.g. "-v")
Pd has mostly adopted single-dash flags, both for cmdline args and for arguments. that doesn't mean that other suffixes (e.g. '@') are "bugs". they are just uncommon.
i don't think so. i know programs that have obligatory flags (though they are uncommon; and i can't remember the name of one right now; but i *know* that i know some such programs)
what do you mean by "actual arguments"? I've never heard of anything like that. i guess you mean arguments that are not "flags" (named arguments), but what is typically called "positional arguments" (as their semantic is encoded in the position: the 1st argument means something else as the 2nd arg).
so to conclude: i think you are overformalizing here, based on some assumptions that do not hold.
in general, a rule for flags could be: is the meaing of an argument-list ambiguous or not. if it allows to specify ambiguous arguments, then there's a bug. if not, then there's none.
fgdy IOhannes