Live data from Hacker News

What’s New in C# 7.0

blogs.msdn.microsoft.com

161–170 of 278 posts

Re: What’s New in C# 7.0

#161

I 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.…

> But is C# really a language you want if that is important to you. C# is used by hundreds if not thousands of games by ways of Unity and is therefore demonstrably good enough in this scenario. Furthermore, just because a language is not C++ does not mean you shouldn't take every opportunity to give programmers tools to write fast code - at the end of the day I doubt anyone would be interested in a language that is p…

While it's used for game development, I'm not convinced that it automatically means features should cater specifically to that audience. Compared to everything non-performance critical the language is used for, the performance crowd is dwarfed. I'm not against it, I personally have been in situations where it would have been useful, I'm just not convinced it's beneficial for the language to implement it.

Re: What’s New in C# 7.0

#162
post #70

Earlier quoted context omitted.

Feels kinda crazy to see tuples and pattern matching "just arrive" when other languages have had them for years.

Sure. Like how streams "just arrived" in Java yet C# has had the equivalent for years. No language has every feature. C# is making enormous strides ahead of many of its counterparts.

Scala seems to be vastly more expressive while simultaneously having only 20% of C#'s feature set.

Re: What’s New in C# 7.0

#163
post #97

Earlier quoted context omitted.

So true. Between 1998 and 2000 VB6 was perfect, you could develop Windows GUI applications in a rapid manner. The VB6 IDE, the Windows UI guideline, the VB6 API, everything was great. And PlanetSourceCode.com was what was later SourceForge and nowadays GitHub. When I read about Microsoft's vision for .Net in 1999 about applications running as a service over the internet (that was their original idea), I thought that…

Edit-and-Continue is the greatest productivity feature ever added to a development stack for the real conditions one would encounter in large projects , and it astonishes me even now how misunderstood it's purpose is. Consulting has me moving jobs a lot and I encounter a veritable kaleidoscope of crappy work. Being able to correct minor issues in scope without restarting, while ten form posts deep in an archaic webfo…

Does Edit-and-Continue ever work? I'm curious, because I'm almost always forced to build x64-only, because of some libraries we have to use that are 64-bit only, and I've never been able to change code while the debugger is running. Supposedly it is supposed to work in VS 2015, but I'm not seeing it - it's always the nasty messagebox saying "Changes to 64-bit applications are not allowed"

Re: What’s New in C# 7.0

#164
post #128
post #90

Earlier quoted context omitted.

Well maybe you don't care, but there are folks that do (I'm on that list) ;-) I want the speed of C but the safety of C#. There are many pieces of code that you probably use every day that go to great lengths to squeeze as much power as possible. Why not help these folks help us? I'm glad there is more focus on performance because we all benefit. (Hoping to see more on the CLR side.)

> I want the speed of C but the safety of C# Try OCaml.

>I want the power of a Bugatti but the efficiency of a Prius.

Use a tractor.

Re: What’s New in C# 7.0

#165
post #108

Earlier quoted context omitted.

There's a few downsides to the Tuple class as mentioned here: https://github.com/dotnet/roslyn/issues/347 Namely, heap allocation and the inability to name tuple members.

And a very verbose syntax. You have to repeat everywhere the different types of the different members.

I find that the verbosity can be minimised by type aliasing. E.g:

using Complex = System.Tuple;

Edit: Clarity

Re: What’s New in C# 7.0

#166
post #8
post #2

Out 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…

> it's age compared to something like scala which has return type declarations at the end, which I find much more readable. Scala or .... VB.net!

LMAO

-Anthony D. Green, Program Manager, Visual Basic

Re: What’s New in C# 7.0

#167
post #108

Earlier quoted context omitted.

And a very verbose syntax. You have to repeat everywhere the different types of the different members.

I find that the verbosity can be minimised by type aliasing. E.g: using Complex = System.Tuple ; Edit: Clarity

But then you might as well declare a class or structure to store the data. The point of tuples is to be self-contained.

Re: What’s New in C# 7.0

#168
I tend to avoid using switch/case for quite irrational reasons. The break statement just looks wrong and I can't layout the code in a way I find at all pleasing. I'll almost always use a sequence of else if conditions instead.

In my ideal world, it'd look like...

    switch (x)
    {
        case 1:
        {
            /* ... */
        }
        case 2:
        case 3:
        {
            /* ... */
        }
    }
And before anyone points it out, switch is the same as else if when the thing being compared is a simple local variable.

Re: What’s New in C# 7.0

#170

I 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.…

> But is C# really a language you want if that is important to you. C# is used by hundreds if not thousands of games by ways of Unity and is therefore demonstrably good enough in this scenario. Furthermore, just because a language is not C++ does not mean you shouldn't take every opportunity to give programmers tools to write fast code - at the end of the day I doubt anyone would be interested in a language that is p…

Isn't Unity stuck with C# 2.0 ?
Post reply on HN