Re: [Mixxx-devel] c++11 support is here

2015-06-07 Thread Daniel Schürmann
Hi, I think we use always the copy-initialization for pod types inside Mixxx (Except initializations lists) int value = 4; For me this is the best readable version and is exactly what the underlying machine code does. The value 4 is copied from the text segment to a cpu register. Now we have

Re: [Mixxx-devel] c++11 support is here

2015-06-07 Thread Max Linke
On 06/07/2015 10:28 PM, Daniel Schürmann wrote: Hi, I think we use always the copy-initialization for pod types inside Mixxx Sure? I don't currently recall what the compiler has to do if we explicitly define a copy constructor, is the copy or implicitly generated move constructor used? For

Re: [Mixxx-devel] c++11 support is here

2015-06-06 Thread Gavin Swanson
I have three. This doesn't actually tell you anything about type, and requires less code change later when that simple type becomes a complex type. Why rely on the compiler to perform an optimization that it has no obligation to perform? Honestly whatever the project feels is best, but document

Re: [Mixxx-devel] c++11 support is here

2015-06-06 Thread Musikpirat
Am 06.06.2015 um 10:53 schrieb Gavin Swanson: I have three. This doesn't actually tell you anything about type, and requires less code change later when that simple type becomes a complex type. If a simple type becomes a complex type you usually do something else with it than before. So there

Re: [Mixxx-devel] c++11 support is here

2015-06-06 Thread Gavin Swanson
On another note. I have not seen a c++ ide, that's not super expensive, that can provide the type of refactoring support java does. On Sat, Jun 6, 2015, 5:01 AM Musikpirat mi...@christian-hufgard.de wrote: Am 06.06.2015 um 10:53 schrieb Gavin Swanson: I have three. This doesn't actually tell

Re: [Mixxx-devel] c++11 support is here

2015-06-06 Thread Musikpirat
Hi, Am 05.06.2015 um 22:44 schrieb Owen Williams: On Fri, 2015-06-05 at 22:30 +0200, Daniel Schürmann wrote: CSAMPLE sample = 0.0; This one. auto should really only be used when assigning from a function whose return value is obvious. What is the advantage of not knowing what kind of

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread Max Linke
On 06/05/2015 09:55 AM, Daniel Schürmann wrote: Hi all. Good news! Thank you RJ. I just one objection to the C++11 white list. The new keyword auto. No auto is awesome. I've started a new simulation Montecarlo simulation program for my PhD and use exclusively auto to declare my

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread Daniel Schürmann
Hi all. Good news! Thank you RJ. I just one objection to the C++11 white list. The new keyword auto. IMHO auto helps to speed up the code writing. But it makes the code harder to understand. Some IDEs are starting to display the real type, but that does not help in GitHub reviews or other

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread Daniel Schürmann
Hi Max, Thank you for the nice blog. I did not know all these reason pro auto. I am currently working in a huge c# project, which uses a Mixed style var / explicit types. Since It is not all my code, It is sometimes a pain to understand the code with all the vars and the mixed style:

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread RJ Ryan
On Fri, Jun 5, 2015 at 4:38 AM, Max Linke max_li...@gmx.de wrote: On 06/05/2015 09:55 AM, Daniel Schürmann wrote: Hi all. Good news! Thank you RJ. I just one objection to the C++11 white list. The new keyword auto. No auto is awesome. I've started a new simulation Montecarlo

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread RJ Ryan
On Fri, Jun 5, 2015 at 1:35 AM, Sean M. Pappalardo - D.J. Pegasus spappala...@mixxx.org wrote: On 06/04/2015 09:43 PM, RJ Ryan wrote: * Visual Studio 2013 (12.0) Does VS2015 offer more C++11 features? Since it's free, we can just declare that to be the minimum version from here on.

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread Owen Williams
On Fri, 2015-06-05 at 08:14 -0400, RJ Ryan wrote: Which can pretty much be summarized as use auto to prevent repeating yourself. My rule of thumb is, use auto when the type is long AND easily understandable from the context. So don't use auto instead of QString just because, but do use

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread Daniel Schürmann
Hi I have updated http://mixxx.org/wiki/doku.php/coding_guidelines?#auto according to our discussion. It is still a draft. Lets tweak it until we have a commitment. I am unsure what is the recommended version for our own typedefs: CSAMPLE sample = 0.0; auto sample = (CSAMPLE)0.0; auto sample =

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread Owen Williams
On Fri, 2015-06-05 at 22:30 +0200, Daniel Schürmann wrote: CSAMPLE sample = 0.0; This one. auto should really only be used when assigning from a function whose return value is obvious. --

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread Gavin Swanson
CSAMPLE sample(0.0); On Fri, Jun 5, 2015, 4:45 PM Owen Williams owilli...@mixxx.org wrote: On Fri, 2015-06-05 at 22:30 +0200, Daniel Schürmann wrote: CSAMPLE sample = 0.0; This one. auto should really only be used when assigning from a function whose return value is obvious.

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread Gavin Swanson
In a project the size of mixxx (at least as they come up) every situation should be enumerated and documented (to the extent possible in an os project). This provides new developers the information to maintain consistency. The code, especially in a large project that hasn't had the formatting

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread Gavin Swanson
are we in violent agreement then? Why not do the optimal thing in the first place for consistency sake? Rather than rely on the compiler to do it for you. Especially in a case like this where the optimization is no more work nor is it less readable. On Fri, Jun 5, 2015, 7:38 PM Owen Williams

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread Gavin Swanson
http://stackoverflow.com/a/4470763 On Fri, Jun 5, 2015, 7:21 PM Owen Williams owilli...@mixxx.org wrote: Since CSAMPLE is a simple type, assignment is best -- and when it works, assignment is the way to go (hurray for smart compilers eliding copies). With the form sample(0.0), it gives the

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread Owen Williams
That's what I said? The compiler is free to elide (remove) the temporary+copying whenever it can, but copy constructor must still be accessible On Fri, 2015-06-05 at 23:34 +, Gavin Swanson wrote: http://stackoverflow.com/a/4470763 On Fri, Jun 5, 2015, 7:21 PM Owen Williams

Re: [Mixxx-devel] c++11 support is here

2015-06-05 Thread Owen Williams
Since CSAMPLE is a simple type, assignment is best -- and when it works, assignment is the way to go (hurray for smart compilers eliding copies). With the form sample(0.0), it gives the impression that CSAMPLE is a complex type with a constructor. On Fri, 2015-06-05 at 22:16 +, Gavin Swanson

Re: [Mixxx-devel] c++11 support is here

2015-06-04 Thread Sean M. Pappalardo - D.J. Pegasus
And ho. ly. crap. Microsoft, yes, Microsoft, now has a version of their VS code editor that runs natively on Linux and Mac: https://www.visualstudio.com/products/code-vs Not that I'd use it because it will likely push developers to use Microsoft-specific functionality as VS always has, but

[Mixxx-devel] c++11 support is here

2015-06-04 Thread RJ Ryan
Mixxx is switching to C++11! The master branch now has -std=c++11 turned on. 1.12 will be the last release without C++11 support. This means we have new minimum requirements for compilers: * Visual Studio 2013 (12.0) * GCC 4.8 (supported on Ubuntu 14.04 and up) * Clang 3.3 (supported on Ubuntu