@mikegoatly@KirillOsenkov@khalidabuhakmeh is there a TryParse or TryDeserialize method? Seems like that's the #csharp idiomatic way of handling this. Not that I don't like custom result types that pass errors, but there are none thus far in the standard stuff AFAIK.
Very proud of my team! Announcing the release of the new Foundational C# Certification in collaboration with freeCodeCamp. The certification is completely free, globally available, and includes a full 35-hour C# training course hosted on Microsoft Learn. Get started at https://msft.it/60199TYZv today, it’s FREE!!! #dotnet#certification#CSharp
Finally getting around to playing with the unified Blazor updates coming in .NET 8. I've been super excited about this ever since they announced it.
This is me running the index page with server-side rendering (SSR), but the weather page is running with both SSR and WebAssembly (The forecast table component is what is using WebAssembly).
Basically Blazor has had two hosting models for web projects: Server and WebAssembly. Server does all of the rendering on the server and requires the client to have a consistent SignalR connection; however, WebAssembly does not require the client to have a consistent connection and instead the client has to download and run all of the WASM and DLL files, which can be extremely heavy on file size (The download size will be small if you use gzip or brotli compression, but it will be larger in the cache once it's uncompressed).
This new model combines those two into one, but also adds plain old server-side rendering (SSR). Now I can pick and choose how a specific component is rendered on the page and the logic is performed. It's so cool that I can combine SSR, WebAssembly, and a SignalR connection in one single project.
"bflat is a native compiler for C# that comes with everything you need to build C# apps for any of the supported platforms. No additional SDKs or NDKs needed"
With it, it's even possible to build C# applications to #Windows 3.1 (!?)
Author: Michal Strehovský - "I work remotely at the .NET Runtime team at Microsoft."
What are people using instead of #VSCode? While the remote editing is good, I've just had a not-great experience with the #CSharp devkit that is enough for me to want to look at alternatives (and alternatives to C# as I no longer use it for work...)
@khalidabuhakmeh
Sorry. I just gotta say how weird it is seeing #csharp, when my eyes are expecting c#. I mean sure, csharp or c#, but #csharp is screwing around with my brain 😂
The short version is that I've modeled the ActivityStreams types using a hybrid between inheritance and the decorator pattern. It abuses the everloving fuck out of virtual properties and probably kills performance, but it supports multiple inheritance and extensions while remaining 100% type-safe.
I did this in C#, a language that doesn't support any of those features natively. The proof-of-concept works, but committing to this fully requires a huge refactor that will permanently shape the public API of this project. Is this a bad idea? Am I dumb for trying this?
The move to feedz.io is complete. Note that only new package builds will go here; if you're currently using the MyGet feed for prerelease packages, please ONLY update to feedz.io when you're ready to take newer dependencies.
If you’re just getting into #dotnet and #csharp deconstruction of types, you can let #JetBrainsRider generate a stub for you based on the code you’ve written. That’s pretty cool! 😎
Today in "why the hell wasn't this crashing sooner"
Ran into this lovely little pair of lines at work yesterday.
var thing = couldBeNull ?? isNotNull;
couldBeNull.DoSomething();
Turns out the thing being checked for null could actually be null. Doing a null check then not bothering with the result causes NullReferenceException. Who knew? 🤷
Working on the Prospector Solitaire tutorial from Bond. CRIKEY that was a lot of boilerplate code to implement a deck of cards! 30 pages of the book and I haven't even shuffled them yet.
Could novice programmers write clean code from the start?
Clean code is not just for professional developers. Especially beginners quickly lose track of their code. Clean code would help against that. I think we can explain clean code principles to absolute programming beginners, for example the DRY principle: