SAMP MType parameters issue
m.b.taylor at bristol.ac.uk
Thu Nov 6 05:16:05 PST 2008
On Wed, 5 Nov 2008, Luigi Paioro wrote:
> Here comes the issue a would like to discuss: if (using the example above) I
> wanted to notify the optional parameter "table-id" as well, I would get a
> syntax error from the Python shell, since Python function arguments
> (identifiers) can be only of the form:
> identifier ::= (letter|"_") (letter | digit | "_")*
> letter ::= lowercase | uppercase
> lowercase ::= "a"..."z"
> uppercase ::= "A"..."Z"
> digit ::= "0"..."9"
> I understand that this is purely a Python issue, but it would be easily
> solved simply modifying the present MTypes parameters (as proposed at the URL
> http://www.ivoa.net/cgi-bin/twiki/bin/view/IVOA/SampMTypes) replacing the -
> (minus) with a _ (underscore):
> table-id -> table_id
> row-list -> row_list
> image-id -> image_id
> and possibly following this naming convention even for any future MType
> parameter name. Without generating much trouble for the rest of the SAMP
As a rule I'm not in favour of letting the standard be too much
influenced by language-specific considerations. However, using the
python named parameter syntax for MType parameters seems like such
a good match that I think it would be nice to facilitate this.
Similar considerations might apply for other languages with similar
syntax as well (though I can't think of any off hand).
Although this does constitute a change to existing practice, as yet
no applications are in public release, so changing it now is not going
to present much difficulty.
So, my vote is in favour of changing these parameter names as Luigi
suggests, and introducing at least a RECOMMENDation (or should it be
a REQUIREment?) in the standard that future MTypes use parameter
and (for symmetry) return value names following the suggested BNF.
Any other views?
Mark Taylor Astronomical Programmer Physics, Bristol University, UK
m.b.taylor at bris.ac.uk +44-117-928-8776 http://www.star.bris.ac.uk/~mbt/
More information about the apps-samp