Saturday, June 4, 2016

Digest for comp.lang.c++@googlegroups.com - 7 updates in 1 topic

JiiPee <no@notvalid.com>: Jun 04 07:07PM +0100

On 04/06/2016 18:55, G B wrote:
 
> If you coming from Delphi then ThisFoo() is better but C# users use
> thisFoo(). Personally I prefer the ThisFoo() because I come from Delphi.
 
> Are you using Visual Studio or something else?
 
normally VS. But I mean doing just standard C++, not necessary windows
programming
Ian Collins <ian-news@hotmail.com>: Jun 05 06:39AM +1200

On 06/ 5/16 06:07 AM, JiiPee wrote:
 
>> Are you using Visual Studio or something else?
 
> normally VS. But I mean doing just standard C++, not necessary windows
> programming
 
ThisFoo() is more common in Windows land, thisFoo() or this_foo() elsewhere.
 
You can't really consider the style for functions in isolation. For
example if your style uses initial capital for class names then
thisFoo() or this_foo() makes sense for functions because it
disambiguates ThisFoo() to the reader.
 
--
Ian
"Chris M. Thomasson" <nospam@nospam.no>: Jun 04 11:52AM -0700


> void ThisIsFoo();
 
> but then noticing that many used lower letter I recently used some years:
 
> void thisIsFoo();
 
FWIW, I use the (this_is_foo) style because I am so used to POSIX Threads.
 
Underscores are abundant in the API...
 
;^o
JiiPee <no@notvalid.com>: Jun 04 06:54PM +0100

On 04/06/2016 18:50, Öö Tiib wrote:
> "ThisIsFoo()" is impossible to differentiate visually from constructing
> a temporary of type "ThisIsFoo". So poor reader of your code has to look
> it up what is going on and so you wasted reader's time.
 
 
you have a point, i ll think about it. I never though about this
G B <gb@gb.com>: Jun 04 06:55PM +0100

On 04/06/2016 17:56, JiiPee wrote:
> I was more like interested in which of the two: thisFoo or ThisFoo
> people use is they use one, becaouse I want to use one of them but i
> keep changing the style
 
If you coming from Delphi then ThisFoo() is better but C# users use
thisFoo(). Personally I prefer the ThisFoo() because I come from Delphi.
 
Are you using Visual Studio or something else?
"Osmium" <r124c4u102@comcast.net>: Jun 04 02:28PM -0500

> which style and what is the reason? Is there any strong good reason to use
> the other and not the other? For my eyes at the moment ThisIsFoo looks
> prettier becouse its "even".
 
I don't use either form but I prefer ThisIsFoo. I suspect the reason is
that we expect the first word of a sentence to be capitalized and seeing
thisIsFoo upsets the delicate balance in our brains.
JiiPee <no@notvalid.com>: Jun 04 09:52PM +0100

On 04/06/2016 20:28, Osmium wrote:
 
> I don't use either form but I prefer ThisIsFoo. I suspect the reason
> is that we expect the first word of a sentence to be capitalized and
> seeing thisIsFoo upsets the delicate balance in our brains.
 
thats how also was thinking, although maybe its not too big issue...
But its true that it a bit conflicts with the creation of an object:
ThisIsFoo();
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: