You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2002/09/10 15:30:54 UTC

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

bmatzelle@tigris.org writes:

> * src/tests/svncpp/svncpp.cpp
>   Added tests for Status::textDescription() and Status::textType().
>   Added tests for Modify::mkdir() and Modify::export().

I'm unable to compile rapidsvn:

svncpp/modify.h:158: warning: keyword 'export' not implemented and will be ignored
svncpp/modify.h:158: syntax error before `const'


Isn't 'export' a keyword?  How is that you can get away naming a
function 'export'?



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by Patrik Husfloen <pa...@student.liu.se>.
> It's all about the naming conventions - it's either:
> 
> 1.  thisMethod()
> 2.  ThisMethod()
> 3.  this_method()
> 

you forgot about This_Method()

/patrik


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by Nuutti Kotivuori <na...@iki.fi>.
brane@xbc.nu wrote:
> Alexander Mueller wrote:
>> Branko Čibej wrote:
>>> Alexander Mueller wrote:
>>>> Doesnt look bad as well. For me, "doExport" or "doSwitch" is
>>>> fine. Its a matter of taste.
>>>
>>> Or just Export and Switch; C++ is case-sensitive, right?
>>>
>> Hm. Personally, I dont like case mixing.
>> -1
> 
> Strange, you said you were satisfied with doExport and doSwitch,
> which is mixing case in the extreme. :-) And the RapidSVN classes
> seem to be capitalized.
> 
> Anyway, if I had a vote, I'd suggest do_something, with something_
> taking second place.

You are talking apples and oranges. Alex means that he doesn't like
inconsistent case, brane is saying things about having mixed case at
all.

It's all about the naming conventions - it's either:

1.  thisMethod()
2.  ThisMethod()
3.  this_method()

for the whole of the interface - and from that results either:

1.  doExport()
2.  Export()
3.  do_export()

or:

1.  export_()
2.  Export()
3.  export_()

with respective conventions. Ofcourse there's other choices as well,
but the choice of the naming convention as a whole should determine if
Export is inconsistent or not regarding the other functions.

-- Naked


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by Branko Čibej <br...@xbc.nu>.
Alexander Mueller wrote:

> Branko Čibej wrote:
>
>> Alexander Mueller wrote:
>>
>>> Doesnt look bad as well. For me, "doExport" or "doSwitch" is fine. 
>>> Its a matter of taste.
>>> Alex
>>
>>
>> Or just Export and Switch; C++ is case-sensitive, right?
>>
> Hm. Personally, I dont like case mixing.
> -1


Strange, you said you were satisfied with doExport and doSwitch, which 
is mixing case in the extreme. :-) And the RapidSVN classes seem to be 
capitalized.

Anyway, if I had a vote, I'd suggest do_something, with something_ 
taking second place.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by Alexander Mueller <al...@littleblue.de>.
Branko Čibej wrote:

> Alexander Mueller wrote:
>
>> Greg Stein wrote:
>>
>>> On Tue, Sep 10, 2002 at 10:37:55AM -0700, Brent R. Matzelle wrote:
>>>  
>>>
>>>> --- Philip Martin <ph...@codematters.co.uk> wrote:
>>>> ...
>>>>   
>>>>
>>>>> export is a keyword in standard ISO C++ and should not be used as a
>>>>> name.  Comeau's EDG-based 4.3 compiler is the only compiler I know
>>>>> of
>>>>> that supports export.
>>>>>     
>>>>
>>>> Okay, since it is a keyword does anyone have any suggestions for an
>>>> alternative name?  How about 'extract()', 'send()', or 'transport()'?
>>>>   
>>>
>>>
>>> For things like this, the SWIG code usually recommends appending a 
>>> trailing
>>> underscore:
>>>
>>>  svn::export_()
>>>  svn::switch_()
>>>
>>> It is visually less intrusive.
>>>
>>> Cheers,
>>> -g
>>>
>>>  
>>>
>> Doesnt look bad as well. For me, "doExport" or "doSwitch" is fine. 
>> Its a matter of taste.
>> Alex
>
>
>
> Or just Export and Switch; C++ is case-sensitive, right?
>
>
Hm. Personally, I dont like case mixing.
-1

Alex



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by Branko Čibej <br...@xbc.nu>.
Alexander Mueller wrote:

> Greg Stein wrote:
>
>>On Tue, Sep 10, 2002 at 10:37:55AM -0700, Brent R. Matzelle wrote:
>>  
>>
>>>--- Philip Martin <ph...@codematters.co.uk> wrote:
>>>...
>>>    
>>>
>>>>export is a keyword in standard ISO C++ and should not be used as a
>>>>name.  Comeau's EDG-based 4.3 compiler is the only compiler I know
>>>>of
>>>>that supports export.
>>>>      
>>>>
>>>Okay, since it is a keyword does anyone have any suggestions for an
>>>alternative name?  How about 'extract()', 'send()', or 'transport()'?
>>>    
>>>
>>
>>For things like this, the SWIG code usually recommends appending a trailing
>>underscore:
>>
>>  svn::export_()
>>  svn::switch_()
>>
>>It is visually less intrusive.
>>
>>Cheers,
>>-g
>>
>>  
>>
> Doesnt look bad as well. For me, "doExport" or "doSwitch" is fine. Its 
> a matter of taste.
> Alex


Or just Export and Switch; C++ is case-sensitive, right?


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by Alexander Mueller <al...@littleblue.de>.
Greg Stein wrote:

>On Tue, Sep 10, 2002 at 10:37:55AM -0700, Brent R. Matzelle wrote:
>  
>
>>--- Philip Martin <ph...@codematters.co.uk> wrote:
>>...
>>    
>>
>>>export is a keyword in standard ISO C++ and should not be used as a
>>>name.  Comeau's EDG-based 4.3 compiler is the only compiler I know
>>>of
>>>that supports export.
>>>      
>>>
>>Okay, since it is a keyword does anyone have any suggestions for an
>>alternative name?  How about 'extract()', 'send()', or 'transport()'?
>>    
>>
>
>For things like this, the SWIG code usually recommends appending a trailing
>underscore:
>
>  svn::export_()
>  svn::switch_()
>
>It is visually less intrusive.
>
>Cheers,
>-g
>
>  
>
Doesnt look bad as well. For me, "doExport" or "doSwitch" is fine. Its a 
matter of taste.
Alex


Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by Greg Stein <gs...@lyra.org>.
On Tue, Sep 10, 2002 at 10:37:55AM -0700, Brent R. Matzelle wrote:
> --- Philip Martin <ph...@codematters.co.uk> wrote:
>...
> > export is a keyword in standard ISO C++ and should not be used as a
> > name.  Comeau's EDG-based 4.3 compiler is the only compiler I know
> > of
> > that supports export.
> 
> Okay, since it is a keyword does anyone have any suggestions for an
> alternative name?  How about 'extract()', 'send()', or 'transport()'?

For things like this, the SWIG code usually recommends appending a trailing
underscore:

  svn::export_()
  svn::switch_()

It is visually less intrusive.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by "Brent R. Matzelle" <bm...@yahoo.com>.
--- Alexander Mueller <al...@littleblue.de> wrote:
> Brent R. Matzelle wrote:
> 
> >--- Philip Martin <ph...@codematters.co.uk> wrote:
> >  
> >
> >>"Brent R. Matzelle" <bm...@yahoo.com> writes:
> >>
> >>    
> >>
> >>>>Isn't 'export' a keyword?  How is that you can get away naming
> >>>>        
> >>>>
> >>a
> >>    
> >>
> >>>>function 'export'?
> >>>>
> >>>>        
> >>>>
> >>>It isn't with with MSVC++ 6.  Are you using gcc?
> >>>      
> >>>
> >>export is a keyword in standard ISO C++ and should not be used as
> a
> >>name.  Comeau's EDG-based 4.3 compiler is the only compiler I
> know
> >>of
> >>that supports export.
> >>    
> >>
> >
> >Okay, since it is a keyword does anyone have any suggestions for
> an
> >alternative name?  How about 'extract()', 'send()', or
> 'transport()'?
> >
> Why not just "doExport" or "performExport"?
> 
> >
> >
> >One other thing.  'switch' is a reserved word so i named the
> wrapper
> >method Modify::mirror() for svn_client_switch().  Does anyone have
> an
> >issue with that?
> >
> >Brent.
> >
> And "doSwitch" or "performSwitch"?
> 
> Alex
> 

The "do" prefix looks concise enough for me.  I'll go with that.

Regards,

Brent.


__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by Alexander Mueller <al...@littleblue.de>.
Brent R. Matzelle wrote:

>--- Philip Martin <ph...@codematters.co.uk> wrote:
>  
>
>>"Brent R. Matzelle" <bm...@yahoo.com> writes:
>>
>>    
>>
>>>>Isn't 'export' a keyword?  How is that you can get away naming
>>>>        
>>>>
>>a
>>    
>>
>>>>function 'export'?
>>>>
>>>>        
>>>>
>>>It isn't with with MSVC++ 6.  Are you using gcc?
>>>      
>>>
>>export is a keyword in standard ISO C++ and should not be used as a
>>name.  Comeau's EDG-based 4.3 compiler is the only compiler I know
>>of
>>that supports export.
>>    
>>
>
>Okay, since it is a keyword does anyone have any suggestions for an
>alternative name?  How about 'extract()', 'send()', or 'transport()'?
>
Why not just "doExport" or "performExport"?

>
>
>One other thing.  'switch' is a reserved word so i named the wrapper
>method Modify::mirror() for svn_client_switch().  Does anyone have an
>issue with that?
>
>Brent.
>
And "doSwitch" or "performSwitch"?

Alex

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
"Brent R. Matzelle" <bm...@yahoo.com> writes:
> That defeats the purpose of the C++ namespacing.  Double namespacing
> doesn't look any better than aliasing:
> 
> svn::svn_switch() as compared to svn::mirror()
> 
> Does the C API have to use these C++ reserved words?

Clearly it would be silly to change the user-visible command names,
and yet it would also be silly for the internal interfaces not to
match the user-visible ones whereever possible.  So yes, I think
there's a compelling reason for the C API to stay the way it is.

Maybe try this: define a special prefix, "X" or something, that you
explicitly document as existing only to protect against keyword
collisions.  Use it for those places in the C++ API where there's a
conflict, and never use it anywhere else: "svn::ls" but
"svn::Xswitch", and so on.

I agree that this is a bit unsightly, but changing the C API names so
that they don't match the user-visible interfaces would be far worse.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by "Brent R. Matzelle" <bm...@yahoo.com>.
--- Ben Collins-Sussman <su...@collab.net> wrote:
> "Brent R. Matzelle" <bm...@yahoo.com> writes:
> 
> > --- Philip Martin <ph...@codematters.co.uk> wrote:
> > > "Brent R. Matzelle" <bm...@yahoo.com> writes:
> > > 
> > > > > Isn't 'export' a keyword?  How is that you can get away
> naming
> > > a
> > > > > function 'export'?
> > > > > 
> > > > 
> > > > It isn't with with MSVC++ 6.  Are you using gcc?
> > > 
> > > export is a keyword in standard ISO C++ and should not be used
> as a
> > > name.  Comeau's EDG-based 4.3 compiler is the only compiler I
> know
> > > of
> > > that supports export.
> > 
> > Okay, since it is a keyword does anyone have any suggestions for
> an
> > alternative name?  How about 'extract()', 'send()', or
> 'transport()'?
> > 
> > 
> > One other thing.  'switch' is a reserved word so i named the
> wrapper
> > method Modify::mirror() for svn_client_switch().  Does anyone
> have an
> > issue with that?
> 
> It seems silly to start inventing aliases for subversion client
> routines.  Nobody wants to remember that 'mirror' means switch, or
> that 'extract' means export.
> 
> Why don't you just namespace-protect the object methods with svn
> prefixes?  That's our standard practice throughout our C code.
> 
>    foo::svn_switch()
>    foo::svn_export()
>    etc.

That defeats the purpose of the C++ namespacing.  Double namespacing
doesn't look any better than aliasing:

svn::svn_switch() as compared to svn::mirror()

Does the C API have to use these C++ reserved words?

Brent.


__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by Ben Collins-Sussman <su...@collab.net>.
"Brent R. Matzelle" <bm...@yahoo.com> writes:

> --- Philip Martin <ph...@codematters.co.uk> wrote:
> > "Brent R. Matzelle" <bm...@yahoo.com> writes:
> > 
> > > > Isn't 'export' a keyword?  How is that you can get away naming
> > a
> > > > function 'export'?
> > > > 
> > > 
> > > It isn't with with MSVC++ 6.  Are you using gcc?
> > 
> > export is a keyword in standard ISO C++ and should not be used as a
> > name.  Comeau's EDG-based 4.3 compiler is the only compiler I know
> > of
> > that supports export.
> 
> Okay, since it is a keyword does anyone have any suggestions for an
> alternative name?  How about 'extract()', 'send()', or 'transport()'?
> 
> 
> One other thing.  'switch' is a reserved word so i named the wrapper
> method Modify::mirror() for svn_client_switch().  Does anyone have an
> issue with that?

It seems silly to start inventing aliases for subversion client
routines.  Nobody wants to remember that 'mirror' means switch, or
that 'extract' means export.

Why don't you just namespace-protect the object methods with svn
prefixes?  That's our standard practice throughout our C code.

   foo::svn_switch()
   foo::svn_export()
   etc.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by "Brent R. Matzelle" <bm...@yahoo.com>.
--- Philip Martin <ph...@codematters.co.uk> wrote:
> "Brent R. Matzelle" <bm...@yahoo.com> writes:
> 
> > > Isn't 'export' a keyword?  How is that you can get away naming
> a
> > > function 'export'?
> > > 
> > 
> > It isn't with with MSVC++ 6.  Are you using gcc?
> 
> export is a keyword in standard ISO C++ and should not be used as a
> name.  Comeau's EDG-based 4.3 compiler is the only compiler I know
> of
> that supports export.

Okay, since it is a keyword does anyone have any suggestions for an
alternative name?  How about 'extract()', 'send()', or 'transport()'?


One other thing.  'switch' is a reserved word so i named the wrapper
method Modify::mirror() for svn_client_switch().  Does anyone have an
issue with that?

Brent.


__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by Philip Martin <ph...@codematters.co.uk>.
"Brent R. Matzelle" <bm...@yahoo.com> writes:

> > Isn't 'export' a keyword?  How is that you can get away naming a
> > function 'export'?
> > 
> 
> It isn't with with MSVC++ 6.  Are you using gcc?

export is a keyword in standard ISO C++ and should not be used as a
name.  Comeau's EDG-based 4.3 compiler is the only compiler I know of
that supports export.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Brent R. Matzelle wrote:
> --- Ben Collins-Sussman <su...@collab.net> wrote:
> 
>>bmatzelle@tigris.org writes:
>>
>>
>>>* src/tests/svncpp/svncpp.cpp
>>>  Added tests for Status::textDescription() and
>>
>>Status::textType().
>>
>>>  Added tests for Modify::mkdir() and Modify::export().
>>
>>I'm unable to compile rapidsvn:
>>
>>svncpp/modify.h:158: warning: keyword 'export' not implemented and
>>will be ignored
>>svncpp/modify.h:158: syntax error before `const'
>>
>>
>>Isn't 'export' a keyword?  How is that you can get away naming a
>>function 'export'?
>>
> 
> 
> It isn't with with MSVC++ 6.  Are you using gcc?

export is most definately a keyword, it's just that most compilers don't 
support it yet.  apparently VC++ is letting you get away with it, but 
gcc is not.

-garrett


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3151 - clients/rapidsvn/trunk/src/tests/svncpp clients/rapidsvn/trunk/src/svncpp

Posted by "Brent R. Matzelle" <bm...@yahoo.com>.
--- Ben Collins-Sussman <su...@collab.net> wrote:
> bmatzelle@tigris.org writes:
> 
> > * src/tests/svncpp/svncpp.cpp
> >   Added tests for Status::textDescription() and
> Status::textType().
> >   Added tests for Modify::mkdir() and Modify::export().
> 
> I'm unable to compile rapidsvn:
> 
> svncpp/modify.h:158: warning: keyword 'export' not implemented and
> will be ignored
> svncpp/modify.h:158: syntax error before `const'
> 
> 
> Isn't 'export' a keyword?  How is that you can get away naming a
> function 'export'?
> 

It isn't with with MSVC++ 6.  Are you using gcc?

Brent.


__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org