I'm going to take some hits for that but... with .NET being open source (never liked Mono..) and all.. I'm tempted to use C# in the future again. Using it on Windows has always been good - and now that it compiles to native code too and that the libs are open....
What's New in C# 6.0 [video]
51–60 of 145 posts
Re: What's New in C# 6.0 [video]
#52Still hoping they add the !(non-nullable) operator. I know its hard http://blog.coverity.com/2013/11/20/c-non-nullable-reference... But dang I would appreciate it. So much code is cluttered with null checks that increases the robustness of the code at the cost of correctness, readability, and poorly defined behavior.
I wonder if there is any chance of Rust getting an abbreviation like `?` so you can write `int?` instead of `Option`. I'm just starting to explore the language, but it seems like a lovely addition.
Re: What's New in C# 6.0 [video]
#53I'm going to take some hits for that but... with .NET being open source (never liked Mono..) and all.. I'm tempted to use C# in the future again. Using it on Windows has always been good - and now that it compiles to native code too and that the libs are open....
I thought that native compilation was only for "Windows Store" apps. Do they now have that available for regular Windows desktop apps too (or more importantly, server-side Linux apps)?
http://www.hanselman.com/blog/AnnouncingNET2015NETAsOpenSour...
Unless Windows Desktop is meant as store applications.
Re: What's New in C# 6.0 [video]
#54While all of the changes look nice in terms of writing less code, they are the kind of syntactic sugar I learned to hate in CoffeeScript. Mostly because the code was so much denser and harder to read. Especially when reading other people's code. As I write more and more code, the more I want simplicity and ease of understanding over typing a few less characters or having more elegant code.
Comparatively the string trick, read-only properties and lambda syntax for simple methods seem very easy to digest.
Re: What's New in C# 6.0 [video]
#55https://github.com/MiniProfiler/dotnet/blob/master/StackExch...
They're extremely useful and intuitive string helper methods. Truncate(), IsNullOrWhiteSpace(), etc are things I use daily. And while you can type string.IsNullOrWhiteSpace(string) that is annoying and counter-intuitive.
Re: What's New in C# 6.0 [video]
#56They need to add these: https://github.com/MiniProfiler/dotnet/blob/master/StackExch... They're extremely useful and intuitive string helper methods. Truncate(), IsNullOrWhiteSpace(), etc are things I use daily. And while you can type string.IsNullOrWhiteSpace(string) that is annoying and counter-intuitive.
I agree that Truncate would be a nice one to include in the core.
Re: What's New in C# 6.0 [video]
#57While all of the changes look nice in terms of writing less code, they are the kind of syntactic sugar I learned to hate in CoffeeScript. Mostly because the code was so much denser and harder to read. Especially when reading other people's code. As I write more and more code, the more I want simplicity and ease of understanding over typing a few less characters or having more elegant code.
As I write more and more code, the more I want simplicity I had a 24 year old developer report to me that apparently thought his bonuses were tied to how many operations he did on a single line of code. He consistently wrote unbelievably complex lambda expressions with multiple conditional operators that would make a single line take up at least 1.5 screenfulls in Visual Studio on a 1920x1080 resolution monitor. Thes…
Re: What's New in C# 6.0 [video]
#58Re: What's New in C# 6.0 [video]
#59They need to add these: https://github.com/MiniProfiler/dotnet/blob/master/StackExch... They're extremely useful and intuitive string helper methods. Truncate(), IsNullOrWhiteSpace(), etc are things I use daily. And while you can type string.IsNullOrWhiteSpace(string) that is annoying and counter-intuitive.
IsNullOrWhiteSpace() was added in dot net 4: http://msdn.microsoft.com/en-us/library/system.string.isnull... I agree that Truncate would be a nice one to include in the core.
Look at what the helper actually does. I already addressed this in my comment.
string hello = magic();
if(hello.IsNullOrWhiteSpace())
{ ... }
Is significantly more intuitive than: string hello = magic();
if(string.IsNullOrWhiteSpace(hello))
{ ... }
Plus it is consistent with things like Contains("XYZ") (e.g. hello.Contains("something")).Truncate is useful just because Substring() throws a bunch of dumb exceptions. It is mostly a workaround for Substring's poor design.
Re: What's New in C# 6.0 [video]
#60While all of the changes look nice in terms of writing less code, they are the kind of syntactic sugar I learned to hate in CoffeeScript. Mostly because the code was so much denser and harder to read. Especially when reading other people's code. As I write more and more code, the more I want simplicity and ease of understanding over typing a few less characters or having more elegant code.
There's some of this in all languages, of course, but "this bit of sugar will make the code cleaner and easier to read" assumes that everyone will adopt a new set of idioms wholesale (which they usually don't).