Re: [webkit-dev] normalizing namespace indenting

2009-11-18 Thread Alexey Proskuryakov


16.11.2009, в 19:54, Chris Jerdonek написал(а):


Second, do people prefer nested namespace blocks to end with the
fully-qualified name (e.g. // namespace JSC::WREC) or just the final
name (e.g. // namespace WREC)?  I have seen both.



I actually prefer no comment after the namespace ending brace. If I  
have any concerns about namespaces not being properly closed, I won't  
believe the comment anyway, and will check by double-clicking on the  
closing brace to select the block. And if I trust that the namespace  
structure is correct, then it's just visual noise.


- WBR, Alexey Proskuryakov

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] normalizing namespace indenting

2009-11-18 Thread Darin Adler
On Nov 18, 2009, at 10:03 AM, Alexey Proskuryakov wrote:

 I actually prefer no comment after the namespace ending brace. If I have any 
 concerns about namespaces not being properly closed, I won't believe the 
 comment anyway, and will check by double-clicking on the closing brace to 
 select the block. And if I trust that the namespace structure is correct, 
 then it's just visual noise.

I agree with Alexey on this point.

-- Darin


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] normalizing namespace indenting

2009-11-18 Thread Chris Jerdonek
On Tue, Nov 17, 2009 at 10:39 PM, Darin Adler da...@apple.com wrote:

 On Nov 16, 2009, at 7:54 PM, Chris Jerdonek wrote:

 So, I was wondering if we can clarify the rule to apply only to the 
 outermost namespace declaration.

 Yes, I think we can.

 (Consecutive declarations like namespace JSC { namespace WREC { would be 
 treated as a single declaration for the purpose of this rule.)

 Neat idea, I think.

Thanks.  The idea stems from a syntactic sugar for using blocks in
C# (different meaning of using from C++).  Instead of doing this--

using (Resource resource1 = new Resource())
{
using (Resource resource2 = new Resource())
{
...
}
}

You can do this:

using (Resource resource1 = new Resource())
using (Resource resource2 = new Resource())
{
...
}

--Chris
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] normalizing namespace indenting

2009-11-17 Thread Darin Adler
On Nov 16, 2009, at 7:54 PM, Chris Jerdonek wrote:

 First, it seems like the original motive was to avoid pointlessly indenting 
 nearly the whole file:
 
 https://lists.webkit.org/pipermail/webkit-dev/2009-September/010002.html
 
 So, I was wondering if we can clarify the rule to apply only to the outermost 
 namespace declaration.

Yes, I think we can.

 (Consecutive declarations like namespace JSC { namespace WREC { would be 
 treated as a single declaration for the purpose of this rule.)

Neat idea, I think.

 Second, do people prefer nested namespace blocks to end with the 
 fully-qualified name (e.g. // namespace JSC::WREC) or just the final name 
 (e.g. // namespace WREC)? I have seen both.

I prefer just the final name, but it’s an extremely mild preference!

-- Darin

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


[webkit-dev] normalizing namespace indenting

2009-11-16 Thread Chris Jerdonek
I am contemplating a script to normalize the namespace indenting
across our code to match our guidelines, so I wanted to clarify two
things.  First, it seems like the original motive was to avoid
pointlessly indenting nearly the whole file:

https://lists.webkit.org/pipermail/webkit-dev/2009-September/010002.html

So, I was wondering if we can clarify the rule to apply only to the
outermost namespace declaration.  Otherwise, files with nested
namespaces like the following become harder to read:

http://trac.webkit.org/browser/trunk/JavaScriptCore/wtf/FastAllocBase.h

(Consecutive declarations like namespace JSC { namespace WREC {
would be treated as a single declaration for the purpose of this
rule.)

Second, do people prefer nested namespace blocks to end with the
fully-qualified name (e.g. // namespace JSC::WREC) or just the final
name (e.g. // namespace WREC)?  I have seen both.

--Chris
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev