[prev in list] [next in list] [prev in thread] [next in thread]
List: amarok-devel
Subject: Re: Unifying singleton accessors
From: Matěj Laitl <matej () laitl ! cz>
Date: 2013-07-07 12:55:39
Message-ID: 1527880.ihjuK9rAYT () edgy
[Download RAW message or body]
On 7. 7. 2013 Mark Kretschmann wrote:
> Hey all,
>
> I really dislike that we use both "MyObject::instance()" and
> "The::myObject()" as singleton accessors. IMO we should just use the
> "instance()" pattern, as this is a common programming standard. The
> other pattern is weird and Amarok-specific, and it also requires extra
> boilerplate code.
>
> Can we get rid of "The::myObject()" and standardize on "instance()"?
I'm +1 for every consistency increase so I'm inherently +1 for this one too.
However, on a bit more long-term scale, I have a different proposal for these.
I'd love to deprecate the "plain" global singletons altogether and replace
them with what I call "components", which are essentially singletons enhanced
with life-time management and unified access pattern.
See http://mail.kde.org/pipermail/amarok-devel/2013-April/011837.html (second
half of the mail) for a more complete proposal. I'd like if you could comment
on that, Markey, as for example Edward did. Unless there are objections, I can
start experimenting with the proposal, show-casing it on the CollectionManager
(perhaps during Akademy).
Matěj
_______________________________________________
Amarok-devel mailing list
Amarok-devel@kde.org
https://mail.kde.org/mailman/listinfo/amarok-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic