Unnoticeable yet awesome new C# feature
-
Yep, But just imagine how many bugs could be fixed if we just take a break and stop adding more features. :-D
That's why many companies change the business model to SAAS
Wrong is evil and must be defeated. - Jeff Ello
-
Well, The boards you play around with are simply too weak to do much of anything but read sensors. I can't find anything I want to use in the IoT world. Any suggestions? I have about a dozen Arm SBC I do get some use out of some of those for NAS, DNS and time servers. My next purchase will be a SiFive RISC-V board[^] just to get early exposure to the instruction set. Best Wishes, -David Delaune
Check out the ESP32 WROVER, but honestly? In Jan. Espressif is officially releasing the ESP32-S3 which is a monster. It has a ton of GPIO, like the ARM boards. It has a USB port you can program to be anything you want (like a USB HID device), it has at least 2MB of PSRAM, and 512kB of SRAM, 300kB or so of which is effectively available for user stuff. The CPU is dual core, at up to 240mhz. The SPI tops out at either 40MHz, or 80Mhz, I forget. If nothing else, I know one of the busses is tappable at 80Mhz but you're sharing it with the PSRAM I think, and you have to be careful how you use it. There might be a totally free 80MHz SPI bus now, I haven't looked into it. But even 40Mhz will drive a small display, and there are enough pins to drive an 8-bit parallel with plenty of pins left over if you need something faster. You can program it in micropython or the ESP-IDF using C or C++. Arduino support is coming, maybe by the time they officially ship. I have a reference board, but I'm not using it because the toolchain is still very preliminary.
Real programmers use butterflies
-
Or more like:
ADD 5 TO SUM GIVING SUM5
Yuk! :rolleyes:
Mircea
-
BillWoodruff wrote:
when i feel bloated, everything looks bloated
Kinda like everybody's pretty when I'm drunk? :-D
As a student, I didn't have much money. I was living with a girl then, and we had to cut down on everything - she insisted that we couldn't even spend any money on beer. Jeeez ... being a student with no beer?? But I was obedient. Then one day she came home having bought makeup for $98.50. I got really mad: You will not allow me even a single beer, and then you go out and spend almost a hundred dollars on makeup! (This is long ago and $100 was a lot more buying power than today.) Of course she started crying: The makeup was so that I would look pretty to you ... I made a deep sigh: But ... That's what I had the beer for! I never saw her again.
-
Or more like:
ADD 5 TO SUM GIVING SUM5
Yuk! :rolleyes:
Mircea
-
...and spice it up with some '?.' and what else. Once upon a time c# was such a beautiful, simply/logical structured language :((
0x01AA wrote:
Once upon a time c# was such a beautiful, simply/logical structured language
It still is!
Latest Articles:
Your one-stop guide for API and web-client Form, XHR, Blob, and Drag & Drop File/Data Uploading -
More like Basic ))) I like that.
-
As a student, I didn't have much money. I was living with a girl then, and we had to cut down on everything - she insisted that we couldn't even spend any money on beer. Jeeez ... being a student with no beer?? But I was obedient. Then one day she came home having bought makeup for $98.50. I got really mad: You will not allow me even a single beer, and then you go out and spend almost a hundred dollars on makeup! (This is long ago and $100 was a lot more buying power than today.) Of course she started crying: The makeup was so that I would look pretty to you ... I made a deep sigh: But ... That's what I had the beer for! I never saw her again.
:laugh: :laugh: :laugh:
If you can't explain something to a six year old, you really don't understand it yourself. (Albert Einstein)
-
0x01AA wrote:
Once upon a time c# was such a beautiful, simply/logical
You could say the same thing about nearly every piece of software today. My OS feels bloated, my compiler IDE feels bloated, my word processor is certainly bloated, even the languages are becoming bloated. :sigh: What happened to 'Keep it Simple'? Best Wishes, David Delaune
-
0x01AA wrote:
Once upon a time c# was such a beautiful, simply/logical
You could say the same thing about nearly every piece of software today. My OS feels bloated, my compiler IDE feels bloated, my word processor is certainly bloated, even the languages are becoming bloated. :sigh: What happened to 'Keep it Simple'? Best Wishes, David Delaune
'Keep it Simple' refers to the users. Because users are getting more and more less educated (Friendly way of saying 'Dumber' :laugh: ), software needs to be 'smarter' (Friendly way of saying 'Bloated' :sigh: ) :suss:
-
Looks more like SQL or Basic. I hope this doesn't keep seeping into other statements. Like: if(myBool is not false) {} if(thisString does not contain("yipes!")) {} if(myString contains("hello") then change it to "goodbye". var myVar = "a variable" END OF STATEMENT The more "stuff" you add to a statement, the more likely that (1) more mistakes will occur, (2) Intellisense will overflow and stop working, and (3) the compiler will choke to death.
-
I was thinking Sql Server T-Sql. When checking for null you need to use
WHERE A.SomeColumn IS NOT NULL
"X IS NOT NULL" is actually an SQL language standard, not just T-SQL.
Daniel
-
More like Basic ))) I like that.
As a longtime VB developer.. It always makes me smile just a little to watch C# language evolve and become a little more "wordy" with each new version. Having spent my first .NET developer years in a "C# is superior to VB in every way because ......" environment, It warms the heart to see old concepts, syntax, and patterns once viewed as inferior years later turn into evolutionary improvement. I applaud the change as I can see cases where that could codebases that are extremely data heavy read a little easier. For anyone but the purists anyway. If I were converting legacy VB code to C# "IsNot" to "Is Not" would feel more natural to me.
-
With latest c# iteration, instead of
x != null
, one can writex is not null
. Meh, I initially thought. But then I tried to override the==
and!=
operators and then.. I understood! :-DA new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
I have been using C# since 2000 and am impressed with how contemplative the languages teams at Microsoft have been to evolve the languages to address the computer science issues of the day. As you mentioned, they are now taking on the issue of nullability and providing the capabilities to identify and address the challenges. I have a background in mathematics and SQL Server so nullability has always been something that I have paid attention. But, many software programmers don't even think in terms of, take for example a Boolean where the values can be true, false, or indeterminate (null). The goal of course is to have more resilient code. The addition of null checking would seem like an easy thing to do, until you realize that the entire .Net library needs to checked and enabled to participate.
-
I was going to say more like SQL
-
Or more like:
ADD 5 TO SUM GIVING SUM5
Yuk! :rolleyes:
Mircea
COBOL truly is filth. What was it that Dijkstra said: "The teaching of COBOL cripples the mind and should be regarded as a criminal offence!"
-
With latest c# iteration, instead of
x != null
, one can writex is not null
. Meh, I initially thought. But then I tried to override the==
and!=
operators and then.. I understood! :-DA new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
Hmmm... that seems more like an Easter Egg than a feature... I mean, in terms of fitting in with C#'s regular syntax, it really doesn't... "if (a!=3 || x is not null || b!=null)" ... and so on... ...what happens if you say "if (x is not null || b!=null)" Is that the same as "if (x is not (null || b!=null))? Doesn't work. Can you say "if (x is not 4)"?
-
With latest c# iteration, instead of
x != null
, one can writex is not null
. Meh, I initially thought. But then I tried to override the==
and!=
operators and then.. I understood! :-DA new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
Good call out. This is a way to future proof against someone adding a messed up operator later. The ironic thing is that if someone wrote incorrect overrides for “==“ or “!=“ where they neglected null, then the likely outcome would be a null pointer exception from the operator itself. Legacy code, before someone introduces a bad operator!= if (obj != null) obj.f(); Avoids future introduction of bad operator. if (obj is not null) obj.f();
-
Marketing. They have to motivate selling a newer version.
Wrong is evil and must be defeated. - Jeff Ello
Jörgen Andersson wrote:
Marketing.
Probably very valid because I believe Microsoft now markets Visual Studio as a product. It has to pay for itself and make a profit. Before I think they were marketing as a tool to increase Windows acceptance. So it was cheaper.
-
With latest c# iteration, instead of
x != null
, one can writex is not null
. Meh, I initially thought. But then I tried to override the==
and!=
operators and then.. I understood! :-DA new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!
Super Lloyd wrote:
With latest c# iteration, instead of x != null, one can write x is not null.
Something else to insist people should not use.
Super Lloyd wrote:
But then I tried to override the == and != operators and then.. I understood!
Operator overloading was something that C++ programmers learned to avoid like the plague before C# existed.