|
since were are currently locked into using VS2008 and .NET 3.5 (long, sad story).
implicit new() : I really like this. Lighter syntax without omitting real information.
Syntax patterns: I don't know about this one. It has the feel of hiding complex conditionals, which I makes me uncomfortable.
Switch expressions: Possibly useful; I'd have to try it and see.
Null-coalescing assignment: In cases where you routinely have nulls (data bases, duh) this would be useful. I wouldn't go right out and replace all my if (value != null) ... logic, however.
indices and range: If I did more numerical analysis I could see it.
Like all such things, ask me again after I've had a chance to use it.
Software Zen: delete this;
|
|
|
|
|
I use VB.NET.
(Ducks for cover)
"Science fiction is any idea that occurs in the head and doesn’t exist yet, but soon will, and will change everything for everybody, and nothing will ever be the same again." Ray Bradbury
|
|
|
|
|
Everything is heap based anyways in C# GC. This isn't unmanaged c or c++.
modified 1-Sep-21 8:38am.
|
|
|
|
|
could that create a semantic confusion between instantiation behavior of Structs and ValueTypes and Classes ?
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
Implicit new: I did not find any place to use in my code. Useless.
Syntax patterns is hard to read. Useless.
Switch is forcing to write default case every time, makes a unnecessary mess.
Null-coalescing assign: hides null references.
Indices and range: Hard to read, but maybe it is faster. So maybe it is not useless.
|
|
|
|
|
What do you mean by "null coalescing" is bad because it hides null references?
How is writing "foo = foo ?? "N/A";" better than simpler form: "foo ??= "N/A";"?
|
|
|
|
|
| feature | vote | remarks |
| ---------------------- | ---- | -------------------------------------------------------------------------------------------------- |
| Implicit new | 1 | useless as far as I can tell. saves a whopping 4 characters over `var x = new MyClass();` |
| Syntax patterns | ? | need to consider some more. seems to be for pattern matching, could perhaps be a 4 or 5 |
| Switch | 3 | I could see using it from time to time |
| Null-coalescing assign | 3 | I use `myList = myList ?? new List<int>();` often enough for this to save me a little typing |
| Indices and range | 5 | I miss Python's list/array slicing, and this is a bit like that but without allocating a new array |
I refuse to acknowledge to the lack of markdown tables on CP
modified 1-Sep-21 8:10am.
|
|
|
|
|
I've basically stopped caring about new language features because not living in the Redmond reality distortion bubble I'm unlikely to ever do a rewrite of my current app from framework to core and MS has mostly decided to treat the former as a bugfix only platform.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
|
|
|
|
|
What, you mean you don't drop your 'legacy' products and begin an entirely new, not-feature-complete, replacement using the latest frameworks every three weeks?
modified 31-Aug-21 10:32am.
|
|
|
|
|
|
This would make a great Trick/Tip !
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
I'll admit I've been working in .NET since the beta releases in late 2001, and when Core came out and wasn't exactly a easy migration, I was pretty upset. but I was ready to move onto a new job at that point anyway.
I avoided core until 2.2 came out and did a small side project with it. the initial learning curve of figuring out where everything was again was a bit frustrating.
when 5.0 got released and I gave it another try, and it wasn't bad this time. Haven't tried it out with a UI yet though, only console and ASP projects.
Thinking back to my old workplace where the flagship product was hovering around 250K lines of code, I do shudder a bit thinking of having to migrate that over. It would be more likely to just rebuild a new version based on 5.0, and be able to redesign to make it better. when you spend a large chunk of your life on one product, you always see better ways to handle things.
|
|
|
|
|
One of the various issues with .NET Core / 5 is that the WinForms designer has issues with custom control designers. The Krypton Toolkit (which I use) is affected by this. The only workaround is to multitarget .NET 4.x as well.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
I'm not willing to start a holy war over any of these new features; they're all rather meh to me.
|
|
|
|
|
1 2 3 4 5
What is this noise!? O O O O O
|
|
|
|
|
... rather, syntactic salt.
|
|
|
|
|
all the others are 1's to me - useless, completely.
How lazy are developers now that these are even part of C#.
I see the quest to write a program in one single line of code, is still alive and well. 
|
|
|
|
|
Slacker007 wrote: I see the quest to write a program in one single line of code, is still alive and well. And I did it!
This is my main program...
using SanderRossel.Extensions;
app.DoWhateverTheElephantTheCustomerWants(); And in SanderRossel.Extensions
public IApplicationBuilder DoWhateverTheElephantTheCustomerWants(this IApplicationBuilder app)
{
Process.Start("Excel.exe");
return program;
} Ok, there's some boilerplate and the Extensions package is more than a single line, but I think it's close enough
|
|
|
|
|
Write a program in one single line of code, is still alive and well? Reminds me of the old Unix days. How few lines of code could we make our project?
|
|
|
|
|
Nothing we couldn't do in C# 1.0, just a bit shorter (and in some cases less readable / takes some getting used to)
The real improvements over the years, for me, would have to be LINQ (what a game-changer!), anonymous types and tuples (alright, tuples are a shortcut too, but a huge one!).
Those really change the way I write my code.
Furthermore, improvements in (ASP).NET Core, like having a default JSON settings file instead of XML, having a built-in IoC container, having Azure extensions, etc. really makes my life a lot more simple.
And being able to use them in .NET Framework (because they're .NET Standard) also helps
|
|
|
|
|
|
Nothing that we could not do with punch cards really.
|
|
|
|