cumulusmx / CumulusMX

The CumulusMX weather program
GNU General Public License v3.0
83 stars 23 forks source link

Cleanly compile both components with VS2015 #45

Closed gdevic closed 4 years ago

gdevic commented 4 years ago

These changes allow Visual Studio 2015 that deploys C# 6 to compile the project. The changes are minor. Also, fixed is the incomplete reference to DevArt module within the ExportMySql project so the module is correctly referenced and copied on build.

mcrossley commented 4 years ago

Ah yes, I forgot the ExportMySQL utility when I updated the DevArt dependency in CumulusMX.

Any reason why you want to stick with C# 6, there have been two releases of Visual Studio that support C# 7 now?

gdevic commented 4 years ago

Hi Mark, this change to the "out var" generates semantically identical code. It is the only reason that the code can't be compiled with a C# 6 compiler, and it's a very minor feature (arguably, according to some, that particular feature is one of the worst features that was let in C# 7 due to its scope leakage etc.)

If we start using features that provide major benefits of a new language version (?) then by all means, let's rewrite as many places to reap the benefit; however, this one single use pattern prevents older compilers from still being used. Sure, there may be time to fully jump on-board in such a way to reap the major benefits.

That said, there are benefits of supporting multiple versions. 2015 is not that old, it is still used by people who for their reasons still want to remain using 2015 for the time being, if I would dare to guess, maybe 10-15% of devs?

Thanks