PolySharp
Roslyn
PolySharp | Roslyn | |
---|---|---|
12 | 158 | |
1,640 | 18,528 | |
- | 0.7% | |
7.1 | 10.0 | |
5 months ago | 6 days ago | |
C# | C# | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
PolySharp
-
What's new in C# 12: overview
Great improvements.
There is PolySharp project that enables you to use most of C#11 features in legacy .NET Framework: https://github.com/Sergio0694/PolySharp - Seems that C#12 features are planned to be implemented: https://github.com/Sergio0694/PolySharp/issues/78
I'm using PolySharp where I'm stuck with .NET Framework 4.6 and I don't have any issues.
Hope one day I'd see concise syntax for catch and/or try expressions: https://github.com/dotnet/csharplang/discussions/2734 - but there is a lot of resistance.
-
.NET web developer takes a job as a .NET desktop developer
You can go one step further and add https://github.com/Sergio0694/PolySharp to your project and you can use new C# 8+ features that don't require the new runtime (like file scoped namesapces, nullable annotations etc).
-
[Question] HttpClient does not recover from error
Is there a reason you're trying to reinvent PolySharp?
-
Do you prefer working with Java or C# legacy code?
You can still use C# 11 (with PolySharp), and you can still get a huge amount of new APIs via the various packages on NuGet that target .NET Standard 2.0. Plus you just get the usual .NET type system and BCL, which are still very good even if when using a framework from a few years ago.
-
Multi-targeted library, with a recent Language Version
Or the PolySharp NuGet package, which uses source generators to polyfill the language features you're actually using.
-
Source Generator Debug always NulLReferecneException
Here's some: - MVVM Toolkit - PolySharp - ComputeSharp
-
What's the biggest difference between C# and Java developers?
Well using PolySharp, of course! 😄
-
How to use C# 11 features in .NET 6 or older versions (even .NET Framework 2.0)
⚠️ Because PolySharp uses source generators, it doesn't work with the package.config file as stated in this issue. The issue says we need to use the SDK style .csproj, but just changing from package.config to Package Reference worked for me.
- PolySharp: polyfills for C#
-
Playing with C# 12 & .NET 8
Some features like records and range require additional boilerplate classes to be added to become usable. You can DIY that or use PolySharp. Some features like static abstract members, default interface methods, etc require runtime support and can't be used.
Roslyn
-
Asynchronous Programming in C#
My understanding is that the .NET team is working toward this with Interceptors: https://github.com/dotnet/roslyn/blob/main/docs/features/int...
-
The Performance Impact of C++'s `final` Keyword
.NET is a little smarter about switch code generation these days: https://github.com/dotnet/roslyn/pull/66081
-
Generating C# code programmatically
Recently, while creating some experimental C# source code generators (xafero/csharp-generators), I was just concatenating strings together. Like you do, you know, if things have to go very quickly. If you have a simple use case, use a formatted multi-line string or some template library like scriban. But I searched for a way to generate more and more complicated logic easily - like for example, adding raw SQL handler methods to my pre-generated DBSet-like classes for my ADO.NET experiment. You could now say: Use Roslyn and that's really fine if you look everything up in a website like SharpLab, which shows immediately the syntax tree of our C# code.
- Still No REPL for .NET Core in Visual Studio
-
Roslyn VS Metalama.Compiler - a user suggested alternative
2 projects | 7 Dec 2023
- Por debaixo do capô: async/await e as mágicas do compilador csharp
-
Use Case Driven Development with Low-Code
At runtime, the Case C# expressions are embedded into a function and dynamically compiled into an assembly using the Roslyn C# compiler. Then the function that contains the expression is called (e.g. CaseAvailableFunction.Availablle()). At runtime, the function provides various methods to access stored case values as well as the current input data.
- Interceptors
- Tentative C# 12 feature list · dotnet/roslyn · Discussion #69074
What are some alternatives?
AnyDiff - A CSharp (C#) diff library that allows you to diff two objects and get a list of the differences back.
Mono-basic - Visual Basic Compiler and Runtime
NetworkPrimitives
MSBuild - The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
csharplang - The official repo for the design of the C# programming language
F# - Please file issues or pull requests here: https://github.com/dotnet/fsharp
.NET Runtime - .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
ClojureCLR - A port of Clojure to the CLR, part of the Clojure project
IsExternalInit - A source code only package which allows you to use C# 9's init and record features in older target frameworks like .NET Standard 2.0 or the "old" .NET Framework by providing a polyfill for the IsExternalInit class.
Roslyn-linq-rewrite - Compiles C# code by first rewriting the syntax trees of LINQ expressions using plain procedural code, minimizing allocations and dynamic dispatch.
SharpLab - .NET language playground
Bridge.NET - :spades: C# to JavaScript compiler. Write modern mobile and web apps in C#. Run anywhere with Bridge.NET.