Hi,
I made the changes in:
http://trac.webkit.org/changeset/179401
http://trac.webkit.org/changeset/179409
Kr,
--
Chris Dumez - Apple Inc.
Cupertino, CA
On Jan 29, 2015, at 10:23 AM, Chris Dumez cdu...@apple.com wrote:
Hi all,
Thanks for the feedback.
I submitted a coding style
Hi all,
Thanks for the feedback.
I submitted a coding style update proposal at Bug 141040
https://bugs.webkit.org/show_bug.cgi?id=141040.
Based on the mailing list feedback, the proposal is to use a static member
function named singleton()”.
I will also upload a patch to align our existing
Perhaps we should document this in the coding style guidelines. I like
consistency and static member function seems like a good way to go,
particularly since it matches the Class::create() pattern we often use for
non-singletons.
On Jan 28, 2015, at 12:10 PM, Ryosuke Niwa rn...@webkit.org
I like the economy of the smaller non-member function name; it seems overly
wordy to be constantly stating the class name as well as the nearly meaningless
word “shared”. I think the word “shared” is what I like least about the member
function approach.
It had always thought that we used
Gotta say, ‘singleton’ seems like a really good name for singletons.
G.
On Jan 28, 2015, at 7:06 PM, Filip Pizlo fpi...@apple.com wrote:
This is shorter: Class::singleton()
It's also more consistent with the rest of our style (we usually don't put
get in getter names).
-Filip
On
] Pattern for singleton classes instance getters
On Jan 28, 2015, at 4:28 PM, Darin Adler da...@apple.com wrote:
I like the economy of the smaller non-member function name; it seems overly
wordy to be constantly stating the class name as well as the nearly
meaningless word “shared”. I think
This is shorter: Class::singleton()
It's also more consistent with the rest of our style (we usually don't put
get in getter names).
-Filip
On Jan 28, 2015, at 6:11 PM, Maciej Stachowiak m...@apple.com wrote:
On Jan 28, 2015, at 4:28 PM, Darin Adler da...@apple.com wrote:
I like the
On Jan 28, 2015, at 4:28 PM, Darin Adler da...@apple.com wrote:
I like the economy of the smaller non-member function name; it seems overly
wordy to be constantly stating the class name as well as the nearly
meaningless word “shared”. I think the word “shared” is what I like least
about
On Wed, Jan 28, 2015 at 8:11 PM, Maciej Stachowiak m...@apple.com
wrote:
Yet another possibility is finding a better name than ‘shared’
for the singleton pattern function, but I don’t have any better
ideas. Class::getSingleton() is more explicit but the extra verbosity
doesn’t seem helpful to
On Jan 28, 2015, at 8:44 PM, Michael Catanzaro mcatanz...@igalia.com wrote:
On Wed, Jan 28, 2015 at 8:11 PM, Maciej Stachowiak m...@apple.com wrote:
Yet another possibility is finding a better name than ‘shared’ for the
singleton pattern function, but I don’t have any better ideas.
Yes, instance() is what I’ve seen mostly outside WebKit as well. This would be
my preference.
Kr,
--
Chris Dumez - Apple Inc.
Cupertino, CA
On Jan 28, 2015, at 8:44 PM, Michael Catanzaro mcatanz...@igalia.com wrote:
On Wed, Jan 28, 2015 at 8:11 PM, Maciej Stachowiak m...@apple.com wrote:
This may be a question of what jargon we’ve encountered, but to me, “singleton
clearly means the one unique instance of this class while “instance means
any instance of this class. If I hadn’t seen this thread, I would interpret
Class::instance() to mean “create a brand new instance of this
Fair enough, singleton() is very explicit indeed. I would be happy with this
naming too.
--
Chris Dumez - Apple Inc.
Cupertino, CA
On Jan 28, 2015, at 9:19 PM, Maciej Stachowiak m...@apple.com wrote:
This may be a question of what jargon we’ve encountered, but to me,
“singleton clearly
Yeah, that is exactly what I was thinking. Instance does not imply only one
like singleton does. Call a singleton a singleton, we have a word for it.
— Timothy Hatcher
On Jan 28, 2015, at 9:19 PM, Maciej Stachowiak m...@apple.com wrote:
This may be a question of what jargon we’ve
On Wed, Jan 28, 2015 at 9:19 PM, Maciej Stachowiak m...@apple.com wrote:
This may be a question of what jargon we've encountered, but to me,
singleton clearly means the one unique instance of this class while
instance means any instance of this class. If I hadn't seen this
thread, I would
IMHO, scoping the function by its class is cleaner.
http://trac.webkit.org/changeset/179247 looks like an improvement to me.
Benjamin
On 1/28/15 11:30 AM, Chris Dumez wrote:
Hi,
I noticed that we are currently not very consistent in WebKit in the
way we implement singleton classes instance
Class::shared() pattern seems good to me.
- R. Niwa
On Wed, Jan 28, 2015 at 11:38 AM, Benjamin Poulain benja...@webkit.org
wrote:
IMHO, scoping the function by its class is cleaner.
http://trac.webkit.org/changeset/179247 looks like an improvement to me.
Benjamin
On 1/28/15 11:30 AM,
17 matches
Mail list logo