Git Product home page Git Product logo

nasa03 / js-ts-csharp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from charliedigital/js-ts-csharp

0.0 0.0 0.0 974 KB

A repository demonstrating functional techniques with C# 10 and the similarities between JavaScript, TypeScript, and C#.

Home Page: https://chrlschn.medium.com/building-up-from-javascript-to-typescript-to-c-10-and-net-6-669a70cd0a66

JavaScript 35.56% C# 46.85% TypeScript 17.58%

js-ts-csharp's Introduction

Building up from JavaScript to TypeScript to C# 10 and .NET 6

This repository is meant to highlight some of the various functional techniques available in C#.

Read more here: https://chrlschn.medium.com/building-up-from-javascript-to-typescript-to-c-10-and-net-6-669a70cd0a66

JS vs TS vs CS

These functional elements of C# ultimately mean that there is quite a bit of syntactic congruence with JavaScript and TypeScript; in fact, I first noticed that C# and JavaScript starting to converge around the release of .NET 3.0.

For many developers that are ready to extend from JavaScript and TypeScript on the backend to a more secure, performant, and robust backend runtime, C# on .NET is a natural extension as it has a clear lineage with JavaScript and TypeScript while providing many benefits including easy mutli-threading, language integrated query (LINQ), and many other features.

If you'd like to learn more about C#'s functional features, check out:

If You'd Like to Contribute...

Make a fork and send a PR! I'd love to see folks add more examples.

(It may make sense to have sub-folders under ts, js, and csharp)

Running the JavaScript Sample

Install Node: https://nodejs.org/en/download/

To run the JavaScript sample:

cd js
node sample.js

To try the battleships sample:

cd js-battleships
node battleships.js

Running the TypeScript Sample

Install TypeScript: https://www.typescriptlang.org/download

To run the TypeScript sample:

cd ts
tsc
node sample.js

To try the battleships sample:

cd ts-battleships
tsc
node battleships.js

Running the C# Sample

Install the .NET SDK: https://dotnet.microsoft.com/en-us/download

To run the base C# sample:

cd cs
dotnet run

You can also try out the Battleships C# sample which is even more functional and demonstrates recursion with C# local functions:

cd cs-battleships
dotnet run

To create your own .NET console project once you have the SDK installed:

dotnet new console

js-ts-csharp's People

Contributors

charliedigital avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.