Live data from Hacker News

What’s New in C# 7.0

blogs.msdn.microsoft.com

141–150 of 278 posts

Re: What’s New in C# 7.0

#141
I just realized that I don't remember I ever saw a C# rant on HN and very very rarely in general. It must have the highest usage/complaints ratio in the industry. Now that I said that I'd love to see the languages ordered by that ratio!

Re: What’s New in C# 7.0

#142
post #135
post #131

Earlier quoted context omitted.

SSDT style database upgrades are still the most popular. Since it's what most of the red gate tools do, unless you use ready roll.

With the migrations tools listed above there is no need for any of the red gate tools.

What tools listed above? I haven't seen any DLM tools mentioned.

Re: What’s New in C# 7.0

#143

My instant concern: the variable names used by function declarations have become part of the API. If you use var to match the library producer's naming for tuple members, a rename of the variable in the definition will break your code, as the name you previously used will no longer exist! Old example: bool Hello(string name) {...} var myName = "world"; Hello(myName); The developer can change the name of variables in…

The names of the tuple field are a part of the method signature. Would you expect to be able to change other parts of the method signature, like the method name or argument types, and not have stuff break?

[edit] unless you're talking about how your example magically introduces "interjection" into the scope. That's not how it works. You would have to say "greeting.interjection". Or use the destruction syntax and say "var (ichosethis, andthis) = generateGreeting();", in which case its the order of the fields, not the name of them, that is important.

Re: What’s New in C# 7.0

#144
post #142
post #135

Earlier quoted context omitted.

With the migrations tools listed above there is no need for any of the red gate tools.

What tools listed above? I haven't seen any DLM tools mentioned.

Sorry, it was in another post:

> My go to migrator is fluent migrator (https://github.com/schambers/fluentmigrator) or flywaydb if anyone objects to the c# (https://flywaydb.org/).

Re: What’s New in C# 7.0

#145
post #90
post #66

Earlier quoted context omitted.

> That 'headache' has to be weighed against the needs of some parties to write very fast code and to have as little overhead as possible. ref returns enables a much more pleasant coding experience that enables these sorts of speedups in these specialized scenarios. I'm worried this could result in a loss of focus, you can't make everyone happy all the time. c# is a fantastic language to develop applications in (web o…

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#

Rust or D seem like the best bet here

Re: What’s New in C# 7.0

#146
post #144
post #142

Earlier quoted context omitted.

What tools listed above? I haven't seen any DLM tools mentioned.

Sorry, it was in another post: > My go to migrator is fluent migrator ( https://github.com/schambers/fluentmigrator ) or flywaydb if anyone objects to the c# ( https://flywaydb.org/ ).

They've been around for a long time.

I don't think they will become as popular as red gate. Since you have to write the migrations yourself. That's a lot of additional work.

Re: What’s New in C# 7.0

#147
I've been really excited about this release, but also a little disappointed that we still don't have proper object composition.

I'd be happy with either extension methods with state or adding traits to the language as a separate feature. I understand the reasons it was decided against in C# 4, but its hard to preach composition over inheritance when the framework is philosophically against it, and it runs contrary to how the whole framework is structured (single inheritance from Object). But it still irks my fussiest self.

You can get something that sort of gets mostly there with ConditionalWeakTable, but its not endorsed by the vendor, and in the experience I had with it while trying to create a mixins module for C# a few years back, makes the GC leak like a sieve at scale.

Re: What’s New in C# 7.0

#148
post #121

Having done a lot of python recently, this looks great (and familiar). But some things feel a little bit rushed: - In the example "(o is int i || (o is string s && int.TryParse(s, out i))": When reading this statement as a human, o is obviously not an int when it comes down to the TryParse function. But if the 1st part was removed, the 2nd part wouldn't be valid either. I know this is technically how declarations wor…

Deconstruct will be an operator and this is how C# handles other operator overrides, e.g. equality, implicit/explicit type conversions, so this is in line with what developers would expect.

Re: What’s New in C# 7.0

#149
post #146
post #144

Earlier quoted context omitted.

Sorry, it was in another post: > My go to migrator is fluent migrator ( https://github.com/schambers/fluentmigrator ) or flywaydb if anyone objects to the c# ( https://flywaydb.org/ ).

They've been around for a long time. I don't think they will become as popular as red gate. Since you have to write the migrations yourself. That's a lot of additional work.

They run deterministicaly though, making them much safer. I've done migrations with these tools that would be impossible with redgate, clients could be several months out of date since an upgrade and the migrations would just work. I've seen redgate/ssdt need manual coaching after just a few weeks.

I also think your over estimating the popularity of red gate. A minority of places use it, whereas a lot use EF migrations.

Post reply on HN