I hate recent C# versions!
-
Am I the only one who hates recent addings to the language? Some examples: ?? Named/optional arguments () ?[] discards :confused:
(_, _, area) = city.GetCityInformation(cityName);
Switch expressions The list can go on and on. They are trying to make programming much easier and at the same time are making the syntax more and more unreadable:mad::mad:
Behzad
The language needs to change as marketing decrees; otherwise it looks like it has halted in it's development. They can't sell something that is tested and tried, something that is reliable. It has to be shiny and new, not boring. That is also the reason VB6 did not die yet. It is tested, tried, reliable and doesn't change. As hard as we try, we cannot kill the beast.
Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
-
Just like many here I use them daily. Especially ?? and ?. Sure as hell beats if (x != null && x.Y != null && x.Y.Z != null)... Discards are useful when you don't need the variable (for example, when doing a TryParse, but only want to validate and not directly use the value). Tuples are great and also beat having to write one-off classes that you'll never use again. Are you sure you hate the features or that you hate having to keep up and not understanding them?
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
Sander Rossel wrote:
Are you sure you hate the features or that you hate having to keep up and not understanding them?
That may be the case. It does seem to get harder to constantly update your skillset, but every time I've done it so far it's been well worth it in the long run. The last big jump update was abandoning C++ (where feature creep is even worse than in C#) in favour of C#. And I have never regretted it: the speed of development and the clarity of the code is so much better - and that impacts the reliability and maintainability of the code as well.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
The language needs to change as marketing decrees; otherwise it looks like it has halted in it's development. They can't sell something that is tested and tried, something that is reliable. It has to be shiny and new, not boring. That is also the reason VB6 did not die yet. It is tested, tried, reliable and doesn't change. As hard as we try, we cannot kill the beast.
Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
Eddy Vluggen wrote:
As hard as we try, we cannot kill the beast.
Or can't we kill the beast because some of us aren't trying? I know a developer who'd still start new VB6 projects in 2022 because that's all he knows, it works and clients are satisfied. Why learn something new when the old still works? This person also uses hidden controls on a form to store values, instead of using variables like the rest of us do. Also, because it works, so why try harder? He'll be retiring later this year and he gets to keep all of his software and clients because no one, and I mean no one, could ever unearth whatever it is that he built. There are plenty of people like that, sort of technical quakers. We had technology in 1999, which is what God intended, and we need nothing newer.
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
-
Some of them are pretty useful. For example:
private void DroppedURL\_DoWork(object sender, DoWorkEventArgs e) { if (sender is BackgroundWorker worker) { ...
Makes code much cleaner than the traditional way:
private void DroppedURL\_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker worker = sender as BackgroundWorker; if (worker != null) { ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
Umm ...
is
predatesas
, yes?as
is intended as an improvement overis
. -
Umm ...
is
predatesas
, yes?as
is intended as an improvement overis
. -
Eddy Vluggen wrote:
As hard as we try, we cannot kill the beast.
Or can't we kill the beast because some of us aren't trying? I know a developer who'd still start new VB6 projects in 2022 because that's all he knows, it works and clients are satisfied. Why learn something new when the old still works? This person also uses hidden controls on a form to store values, instead of using variables like the rest of us do. Also, because it works, so why try harder? He'll be retiring later this year and he gets to keep all of his software and clients because no one, and I mean no one, could ever unearth whatever it is that he built. There are plenty of people like that, sort of technical quakers. We had technology in 1999, which is what God intended, and we need nothing newer.
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
Sander Rossel wrote:
I know a developer who'd still start new VB6 projects in 2022 because that's all he knows, it works and clients are satisfied. Why learn something new when the old still works?
Well, that's the entire problem; it is reliable, doesn't change, and does exactly as intended for years on end. If his clients are satisfied, then they'll pay, even if the language is not "officially" supported. To make it worse; this person will have experience, and will have solved these problems before, where we are confronted with changes to the language each six months.
Sander Rossel wrote:
This person also uses hidden controls on a form to store values, instead of using variables like the rest of us do. Also, because it works, so why try harder?
I worked for someone who wrote our new flagship in C#, while I maintained the VB6 version, who put 31 booleans in a string-field in the database and claimed it to be efficient. You can be an idiot in any language, and I met some academically trained idiots too.
Sander Rossel wrote:
He'll be retiring later this year and he gets to keep all of his software and clients because no one, and I mean no one, could ever unearth whatever it is that he built.
You might want to learn from that :)
Sander Rossel wrote:
There are plenty of people like that, sort of technical quakers. We had technology in 1999, which is what God intended, and we need nothing newer.
We do not change for change's sake. Improvements, very welcome; but both the UI-changes since beveled components and the changes to the language specification (with breaking cost-inducing changes) are mostly changes without improvements. There's a cost to everything :)
Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
-
Never heard of it.
-
Never heard of it.
-
C++ joined the chat
GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
-
Maybe under other names? - `is` with "declaration pattern" - Three-operand `is` - C#7-`is`
Seems kludgey. We need a whole new language with everything we've learned over the past twenty years included, with cleaner syntax, rather than bits stuck on at odd angles.
-
The language needs to change as marketing decrees; otherwise it looks like it has halted in it's development. They can't sell something that is tested and tried, something that is reliable. It has to be shiny and new, not boring. That is also the reason VB6 did not die yet. It is tested, tried, reliable and doesn't change. As hard as we try, we cannot kill the beast.
Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
Eddy Vluggen wrote:
The language needs to change as marketing decrees; otherwise it looks like it has halted in it's development.
Actually, if you look at the arc of the language changes (particularly the earlier ones) you can see how they evolved to add functional programming capabilities which was definitely needed to support mixed C#/F# programming styles. I tend to think that was the overall plan by Anders Hejlsberg rather than being driven by market forces. That said, yeah, lately it seems there's more of a "what can we change to keep it looking fresh" attitude, though again, I still think Anders is at the helm and wanting to push C# into what might be considered uncharted territories, though still, much of what he's doing has already been done, even if obscurely in languages like APL.
Latest Article:
Create a Digital Ocean Droplet for .NET Core Web API with a real SSL Certificate on a Domain -
Seems kludgey. We need a whole new language with everything we've learned over the past twenty years included, with cleaner syntax, rather than bits stuck on at odd angles.
The "best" part is that, like `out`-with-declaration, the declaration pollutes the scope *surrounding* the `if`. That's also annoying about the old pattern of using `as` and checking whether the result is `null`, but this new syntax syntactically suggests that it solves that long-standing annoyance and it doesn't.
-
Be more positive - learn these additions, but use only if fits... After all - they do not force you!!!
"Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid." ― Albert Einstein
Gone are the days when you could sit back a read a "Command" manual. You need at least a browser.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
-
The "best" part is that, like `out`-with-declaration, the declaration pollutes the scope *surrounding* the `if`. That's also annoying about the old pattern of using `as` and checking whether the result is `null`, but this new syntax syntactically suggests that it solves that long-standing annoyance and it doesn't.
I agree with a desire to not pollute the scope with rubbish. On the other hand, maybe defining a new scope is the better solution -- define a new Method. In so many cases, when a scope becomes polluted, it's a side-effect of not splitting the logic into enough granularity. It seems like maybe C# needs a
with
statement :D . Or maybe not, I've never liked thewith
statement in languages which include it. But if C# could getwith
right, maybe even I would use it. -
Am I the only one who hates recent addings to the language? Some examples: ?? Named/optional arguments () ?[] discards :confused:
(_, _, area) = city.GetCityInformation(cityName);
Switch expressions The list can go on and on. They are trying to make programming much easier and at the same time are making the syntax more and more unreadable:mad::mad:
Behzad
Machine Learning demands it! We're being asked to be more expressive when talking to machines. Expand our vocabulary; so as to speak.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
-
Eddy Vluggen wrote:
The language needs to change as marketing decrees; otherwise it looks like it has halted in it's development.
Actually, if you look at the arc of the language changes (particularly the earlier ones) you can see how they evolved to add functional programming capabilities which was definitely needed to support mixed C#/F# programming styles. I tend to think that was the overall plan by Anders Hejlsberg rather than being driven by market forces. That said, yeah, lately it seems there's more of a "what can we change to keep it looking fresh" attitude, though again, I still think Anders is at the helm and wanting to push C# into what might be considered uncharted territories, though still, much of what he's doing has already been done, even if obscurely in languages like APL.
Latest Article:
Create a Digital Ocean Droplet for .NET Core Web API with a real SSL Certificate on a DomainIf Anders had better idea's, he should have proposed and explained them. Then we'd talk about it. C# and F# are rather distinct languages; you can use both in the same runtime, so no problem there. You don't even want C# to be F#, they're not meant to do the same thing. He's not at the helm, Marketing is.
Bastard Programmer from Hell :suss: "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
-
Never heard of it.
It does the null test, declares the new variable, assigns the value and completes the
if
in one statement. Think of it like the very old C way of doing afor
loop:int i;
...
for (i = 0; i < 10; i++) ...As opposed to the simpler version that was added in C99:
for (int i = 0; i < 10; i++) ...
People complained that that was a kludge back then as well! :laugh: I was a sceptic, but once you are used to it you probably won't go back.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
The "best" part is that, like `out`-with-declaration, the declaration pollutes the scope *surrounding* the `if`. That's also annoying about the old pattern of using `as` and checking whether the result is `null`, but this new syntax syntactically suggests that it solves that long-standing annoyance and it doesn't.
I'd agree - the scope should logically be limited to the
if
block. It seems strange that it wasn't really ..."I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
It does the null test, declares the new variable, assigns the value and completes the
if
in one statement. Think of it like the very old C way of doing afor
loop:int i;
...
for (i = 0; i < 10; i++) ...As opposed to the simpler version that was added in C99:
for (int i = 0; i < 10; i++) ...
People complained that that was a kludge back then as well! :laugh: I was a sceptic, but once you are used to it you probably won't go back.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
I agree, yes, that's good, though I don't use C99 either. On the other hand, I notice that there is no similar syntax for
while
:-D .