This thread was pretty interesting. Sorry, I came late to the party.
I can totally see why folks would struggle with this. Don't feel bad. Looks
like everyone did the right thing:
* A person suggests something that doesn't sound correct
* Expert clarifies the issue
* Everyone tries things out in a sandbox to prove to themselves that the
expert is correct.
Result:
* Progress on the project
* Transfer of knowledge
Here is my interpretation of ++i vs --i in for loops
for(;;++i) => Old-school C programmer, or someone like me who has picked it up
to look like I am.
for(;;i++) => Java developer, or some who is too cool to be and old-school C
programmer
As Chris pointed out, modern compilers will do the most efficient operation in
this context, which is ++i. So in my mind:
* Write your loop in the style that is used in the code base for consistency
sake.
Sincerely,
Julie S.
--- On Fri, 4/19/13, Holger Marzen <[email protected]> wrote:
From: Holger Marzen <[email protected]>
Subject: Re: [Rosegarden-devel] Subgroups latency compensation off by one
To: "D. Michael McIntyre" <[email protected]>
Cc: "rosegarden-devel" <[email protected]>, "Chris Cannam"
<[email protected]>
Date: Friday, April 19, 2013, 10:15 AM
On Fri, 19 Apr 2013, D. Michael McIntyre wrote:
> On 04/19/2013 08:40 AM, Holger Marzen wrote:
>
> > I was sure that it makes a difference inside:
>
> If it makes you feel better, brainfarting old man, I wrote this (Thunderbird
> is mangling the indentation for some reason), and then I flipped it for ++i
> and compiled it again.
>
> Different means to the same result. Proving that Cannam guy right.
Yeah, I did this, too. Even in Perl it makes do difference.
#!/usr/bin/perl
for ($i=0; $i<10; $i++) { print $i; }
print "\n";
for ($i=0; $i<10; ++$i) { print $i; }
print "\n";
Of course it's a world wide conspiracy against me. Someone travelled
into the past and changed all compilers and interpreters.
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel