On Thu, 1 May 2008, Alasdair Allan wrote:
> An issue about language neutrality. You have the method names of the form;
>
> samp.hub.isAlive( )
>
> in the XML-RPC mapping of the Standard Profile. This is of course very
> Java-centric.
That's a bit harsh - you can't have a method name with a full stop in Java either. The intention is namespace delimitation, so if I'd had my (somewhat rusty) Perl head on when deciding this bit it would have looked something like Samp::Hub::isAlive(), which I suspect is still not a valid Perl method name.
> For instance. the period is not a valid identifier in Perl where you can't
> have a method name with a full stop in it. This means that auto-dispatch from
> a Perl XML-RPC server is very hard (if not impossible) to implement.
I always thought that Perl's quoting mechanisms were under-powered :-).
If I understand what you're talking about correctly, auto-dispatch is some kind of syntactic sugar - you're not saying that you can't make these XML-RPC invocations, just that those periods make it harder to write your entire hub implementation in a single line of Perl.
As I say the intention is namespacing - the thinking being that you might want to run a single XML-RPC server which offers a SAMP hub or SAMP client (or both) along with some other completely unrelated services, and so it's good practice to avoid using XML-RPC methodNames which might be in use for some other purpose.
In practice - that's not very likely, so removing the namespacing altogether would probably not hurt. Alternatively some other more auto-dispatch-friendly namespacing mechanism could be used (which I guess most likely means samp_hub_isAlive()). Personally I kinda like the dots there, but I don't have ever such strong feelings about it.
-- Mark Taylor Astronomical Programmer Physics, Bristol University, UK m.b.taylor@bris.ac.uk +44-117-928-8776 http://www.star.bris.ac.uk/~mbt/Received on 2008-05-01Z18:34:40