On 21 dec 2010, at 20:44, Alex Alves wrote:
> Hi,
>
> I have some questions regarding RFC 147 (CLI):
> 1) Array manipulation:
> I couldn't understand from the spec how one does array manipulation. For
> example:
> srs = servicereferences null (objectclass=*Managed*)
> sr = $srs [0] # How do I do this? Do I need to use a foreach?
There is no direct way to manipulate an array at the moment. I'll put this in
the RFC.
> 2) Pre-built commands:
> Is the registration of BundleContext's methods (and PackageAdmin's) going to
> be part of the spec? In other words, would 'servicereference' be a standard
> (pre-built) command?
No, there is another RFC in the works for the standard commands. RFC 147 will
be virtually command free.
> 3) Currying:
> IMO, it will be common for people to nest Java commands, thus having to group
> functions with arguments instead of using the standard lambda syntax seems a
> bit annoying.
> For example, considering the following example in the web-page:
>
> <bundle 6> headers
This is btw now (bundle 6) headers
>
> I would find it more intuitive if it were:
>
> bundle 6 headers
>
> In this case, one would first try to curry the 'bundle' function as if it had
> two arguments, and if it fails, then consider it as the invocation of a
> function that returns another function.
In my opinion this becomes too undeterministic, the current algorithm is
already tricky in how it matches different methods. And with closures you would
not even have this luxury to be able to match.
Anyway intuition is very much in the eye of the beholder so the "user friendly"
commands should be left up to the scripting facility or a list of standardized
commands.
> I understand that the current syntax is useful when dealing with 'shell
> commands', but I think that will be less common than dealing with Java
> commands introspected through reflection.
I am not sure I understand?
> Btw, I apologize if these questions have been discussed in some other forum,
> please point me to it if that's the case.
Why not join the internal discussions, looking at your email you're from Oracle?
Kind regards,
Peter Kriens
>
> Cheers,
> Alex
>
>
> _______________________________________________
> OSGi Developer Mail List
> [email protected]
> https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev