.NET language playground (by ashmind)


Basic SharpLab repo stats
13 days ago

ashmind/SharpLab is an open source project licensed under BSD 2-clause "Simplified" License which is an OSI approved license.

SharpLab Alternatives

Similar projects and alternatives to SharpLab
  • GitHub repo Roslyn

    The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.

  • GitHub repo csharplang

    The official repo for the design of the C# programming language

  • GitHub repo Runtime

    .NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.

  • GitHub repo referencesource

    Source from the Microsoft .NET Reference Source that represent a subset of the .NET Framework

  • GitHub repo ASP.NET Core

    ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

  • GitHub repo Polly

    Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.

  • GitHub repo BenchmarkDotNet

    Powerful .NET library for benchmarking

  • GitHub repo FluentValidation

    A popular .NET validation library for building strongly-typed validation rules.

  • GitHub repo nom

    Rust parser combinator framework

  • GitHub repo windows-rs

    Rust for Windows

  • GitHub repo Prism

    Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Xamarin Forms, and Uno / Win UI Applications.. (by PrismLibrary)

  • GitHub repo intellij-rust

    Rust plugin for the IntelliJ Platform

  • GitHub repo AspNetCoreDiagnosticScenarios

    This repository has examples of broken patterns in ASP.NET Core applications

  • GitHub repo F#

    Please file issues or pull requests here: (by fsharp)

  • GitHub repo PropertyChanged

    Injects INotifyPropertyChanged code into properties at compile time

  • GitHub repo simd-fizzbuzz

    Simple demo for using the Java 16 Vector API, using the well-known "FizzBuzz" example

  • GitHub repo libraries

NOTE: The number of mentions on this list indicates mentions on common posts. Hence, a higher number means a better SharpLab alternative or higher similarity.


Posts where SharpLab has been mentioned. We have used some of these posts to build our list of alternatives and similar projects - the last one was on 2021-04-10.
  • Example from a freeBootCamp article showed as a valid example of good pratice. | 2021-04-10
    A good example of a similar optimization I saw was in C#. It hardcodes a binary search tree into the program (I assume they avoided a dictionary because in C# that means heap allocations, even if it would give better time complexity).
  • Is return true; valid for an Async method? | 2021-04-10
    Looks like it:
  • C# 9 Pattern Matching | 2021-04-07
  • Thoughts on “and”, “or”, “not”, “is” | 2021-04-07
  • Top-level Statements in C# | 2021-04-06
    Using sharplab, we can see how the C# compiler transforms this code before it's compiled. Notice that the Program class and Main method are still getting generated behind the scenes, but you don't have to write them.
  • When Assigning Member Variables In a Single Statement (e.g. (Foo, Bar) = (foo, bar)), What Is Really Going On? | 2021-04-02
    The IL is more complex, but asm ends up the same.
  • [Proposal] Introduce Date and Time only structs | 2021-04-02 | 2021-04-02
    I believe they mean properties that return a constant value like this:
  • Five secrets of .NET async await
    If we look at IL code something like this -SharpLab , you can see it is creating a state machine and Task under the hood.
  • How do you turn syntactic sugar into low level compilable code? | 2021-03-26
    I'm using SharpLab to see how this works behind the scenes:
  • What is your opinion on Rust from a C# dev's point of view? | 2021-03-26
    As an aside, you can inline 'lambdas' in C# if you do something horrible like this, because the JIT knows the exact type of F it can devirt and inline the call to Invoke().
  • goto used in .NET sourcecode | 2021-03-25
    Yes and no
  • Python Switch Statement | 2021-03-21
    This is the bad part of Python's match, I don't understand why they want to do it this way - in neither Scala, Rust, F#, C# you'd would (AFAIK) hit such issue. For example C# example of both behaviors:
  • Is passing by reference a bad practice? | 2021-03-17
    For anyone else who is still confused, here's a quick example. You'll notice that the two functions are basically the same, both when passing in a value type and a reference, except one uses the ref keyword. While it is true that the int value that is passed into the method is a value of an integer and that the List is a reference, they have different semantics.
  • FizzBuzz – SIMD Style | 2021-03-11
    Good comment, however for a / 2 and other powers of two modern compilers are instead optimizing division into shifts and modulo into bitwise and. Both are very fast instructions, faster than integer multiplication.

    Even JIT compilers do these optimizations: