Noob question, why tuples? I mean why 3?
What’s New in C# 7.0
191–200 of 278 posts
Re: What’s New in C# 7.0
#192I don't like the idea of accessing tuple values by their local name var names = LookupName(id); WriteLine($"found {names.first} {names.last}."); It's leaky and should simply use the deconstructing syntax instead. I'm on the fence about the ref returns. It can lead to some fantastic performance improvements and enable otherwise unusable datastructures. But is C# really a language you want if that is important to you.…
Re: What’s New in C# 7.0
#193Re: What’s New in C# 7.0
#194Pattern matching, tuples, local functions... feels like someone was inspired by how Typescript turned out :)
Re: What’s New in C# 7.0
#195Re: What’s New in C# 7.0
#196Out variables seem like a mis-feature, especially when they are adding a better alternative (Tuples) in the same release. It's great to finally have tuples, but the c/java style syntax is showing it's age compared to something like scala which has return type declarations at the end, which I find much more readable. Literal improvements will be a godsend for writing database migrations. Ref returns and locals look li…
Re: What’s New in C# 7.0
#197Pattern matching! Tuples! Awesome, C# 7.0 is scratching two itches I've felt every time I've worked with it. If only .NET had a suitable cross-platform UI toolkit, then I'd be using it everywhere. Eto.Forms is a good attempt but I found rather buggy and limited at this point in development. Avalonia, while further along in terms of stability and features, doesn't even try to fit in with any platform's look and feel.
Why not winforms? Very convenient, and mostly works in mono
Re: What’s New in C# 7.0
#198Sometimes it feels like we're entering a new age of coding. C# is so full of "features" that code refactoring tools like ReSharper, CodeRush and JustCode became simply indispensable. It is quite hard to be sure, every time, what is the most elegant/compact way of doing things. In the .Net/VisualStudio world, the language tooling (Intelisense, visual drawing XAML & WinForms, etc) became as important as the language se…
That type of programming never went away. That is what I was doing on Windows 3.x and have done while coding in Mac OS X and Windows. Also the reason I never quite adapted to UNIX mentally of VI/Emacs. Even though I have spent enough years coding for UNIX that me and Emacs are quite old acquainted with each other.
Re: What’s New in C# 7.0
#199Earlier quoted context omitted.
C++ has the same problem. I was already using dlls with plugins in Windows 3.1 and C++.
C++ doesn't have this problem, because it doesn't allow virtual function templates. For that matter, it doesn't allow any templates across ABI boundary, except when you manually instantiate them (extern template) - and then only for those explicit instantiations. So it is effectively impossible to have a generic C++ API using templates that is not statically linked.
Borland C++ for Windows 3.x had an initial implementation for templates as they started to be discussed at ANSI and also supported exporting classes across dlls, providing both producer and consumer were Borland C++.
Re: What’s New in C# 7.0
#200Earlier quoted context omitted.
> CSharp once again showing it is the best language in terms of features and improvements. That's a pretty sweeping generalization. Most of the headline features in the article are already in other languages e.g. Scala.
The difference being CSharp is actually used by a large number of people. Scala is not even in the top 10 used languages [0]. [0] http://www.tiobe.com/tiobe-index/
I agree that C# is far more widely used than Scala, but Scala is being used by significant numbers of developers esp. for Spark. Tiobe is also widely regarded as a pretty poor indicator of language adoption.