Frank Schönheit - Sun Microsystems Germany wrote:
Hi Stephan,
(re-routing to interface-discuss)
But is OfficeResourceLoader a service or a singleton?
It needs to be, since it cashes the obtained resource bundles.
I have state, therefore I am! :)
Honestly: needs to be what? (Caching might for example be done across
multiple service instances, or a service implementation might behave as
a singleton, by always returning the same instance for createInstance.
"What do we need singletons for in UNO, then?" you might ask. "Well, I
have no idea" I would confess.)
(If it is a
singleton, we might want to discuss whether we want to deviate from
existing practice of naming singletons in the OOo API with a "the"
prefix...)
If this is existing practice (I wasn't sure, because I found quite some
services which claimed to be (old-style?) singletons which were not
prefixed with "the"), then I'm fine with it.
side note: I don't really *like* the "the" prefix, it sounds strange to
me, and unnecessary since the fact that it's a singleton is nowadays
syntactically obvious (both from the IDL and at runtime from the
"/singletons/<name>" argument to the context's getByValue), but hey, I'm
always for consistency :)
Thinking about it: it used to be common practice (at least that is my
impression) to name (old style) singletons with "the." However, it was
also the case that there always was an old style service Foo together
with an old style singleton theFoo of type Foo. With a new style
singleton of type XFoo, there no longer is a need for any service Foo,
so, yes, why not go forward and no longer prefix new style singletons
with "the"---what do others think?
-Stephan
Ciao
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]