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

Overview

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
You might also like...

JavaScript game for Rock Paper Scissors between player and bot

rock-paper-scissors-game JavaScript game for Rock Paper Scissors between player and bot Try it here! : https://rock-paper-scissors-221ef.web.app/ V1.1

Feb 10, 2022

🍭 search-buddy ultra lightweight javascript plugin that can help you create instant search and/or facilitate navigation between pages.

🍭 search-buddy ultra lightweight javascript plugin that can help you create instant search and/or facilitate navigation between pages.

🍭 search-buddy search-buddy is an open‑source ultra lightweight javascript plugin (* 1kb). It can help you create instant search and/or facilitate n

Jun 16, 2022

Create beautiful, functional and extensive (Multi) Select Fields with pure, vanilla JavaScript.

tail.select.js - Beautify Select Fields (formerly tail.select) Replace and Improve your HTML select fields with style and without jQuery! The tail.s

Dec 30, 2022

A utility for creating toggleable items with JavaScript. Inspired by bootstrap's toggle utility. Implemented in vanillaJS in a functional style.

LUX TOGGLE Demo: https://jesschampion.github.io/lux-toggle/ A utility for creating toggleable dom elements with JavaScript. Inspired by bootstrap's to

Oct 3, 2020

Babel plugin and helper functions for interoperation between Node.js native ESM and Babel ESM

babel-plugin-node-cjs-interop and node-cjs-interop: fix the default import interoperability issue in Node.js The problem to solve Consider the followi

Nov 6, 2022

DoMe is a ToDo App. you can add, delete and reorder elements of the todo list using drag and drop. You can also toggle between dark&light mode

DO ME Todo App Live Preview : DO ME Built With : - ReactJS - TailwindCSS Make sure you have: - Git - Nodejs version 14 or higher (we recommend using

Nov 18, 2022

Lightweight ( 2.3kB gzipped) and performant natural sorting of arrays and collections by differentiating between unicode characters, numbers, dates, etc.

fast-natural-order-by Lightweight ( 2.3kB gzipped) and performant natural sorting of arrays and collections by differentiating between unicode charac

Nov 14, 2022

Cloud Native, DevOps, GitOps, Open Source, industry news, culture, and the 'ish between.

Cloud Native, DevOps, GitOps, Open Source, industry news, culture, and the 'ish between.

DevOps'ish DevOps'ish is authored by Chris Short and Made in Michigan. What is DevOps? I'm glad you asked. Newsletter Writing Process Everyone needs a

Jan 12, 2022
Owner
Charles Chen
A Guy That Codes ◽ .NET ◽ C# ◽ Node ◽ JavaScript ◽ TypeScript ◽ Azure ◽ AWS ◽ Google Cloud ◽ Vue ◽ React ◽ CosmosDB ◽ Neo4j ◽ SQL ◽ NoSQL
Charles Chen
Node.js TypeScript project demonstrating a Prisma integration with PostgreSQL

Prisma with PostgreSQL, TypeScript, Serverless and Parameter Store This project is the outcome of following the Prisma Getting Started guide. In addit

Christian Rich 10 Aug 28, 2022
This project is an educational asset demonstrating the use of AWS amplify, Graphql API, Appsync, Material UI and amazon cognito. T

This project is an educational asset demonstrating the use of AWS amplify, Graphql API, Appsync, Material UI and amazon cognito. This project belongs to Black bird and this repo will remain dormant until final decision.

Shikhar 7 Oct 12, 2022
Demonstrating the Dashboard++ method of organizing a vault in Obsidian

Information This repository is an Obsidian vault that demonstrates using the Dashboard++ method for organizing and navigating notes. For further detai

null 194 Jan 3, 2023
A web app demonstrating how the Fourier series can be used to approximate user-inputted line drawing

Fourier Series Animation An interactive React web app that demonstrates how an arbitrary user-inputted line drawing can be approximated using the Four

Jason Wang 31 Dec 22, 2022
Open Horizon service container demonstrating Node-RED Object Detection

service-node-red-object-detection Open Horizon service container demonstrating Node-RED Object Detection. This is an Open Horizon configuration to dep

null 4 Dec 25, 2022
RepoProvas API, a system for sharing tests between students, built with Typescript, Node.js, Express, Prisma and Postgres.

Repoprovas Built With ?? Description RepoProvas API, a system for sharing tests between students, built with Typescript, Node.js, Express, Prisma and

Lucas Lima 3 Dec 13, 2022
A transpiler from golang's type to typescript's type for collaboration between frontend & backend.

go2type go2type.vercel.app (backup site) A typescript transpiler that convert golang's type to typescript's type. Help front-end developer to work fas

Oanakiaja 8 Sep 26, 2022
Functional-style Cloudflare Durable Objects with direct API calls from Cloudflare Workers and TypeScript support.

durable-apis Simplifies usage of Cloudflare Durable Objects, allowing a functional programming style or class style, lightweight object definitions, a

Dabble 12 Jan 2, 2023
Typescript library for functional programming.

Sa Lambda Typescript library for functional programming. Document TODO Either Maybe Iterator Pipe & Flow Task (Promise-Like) some math utils Installat

SoraLib 9 Dec 6, 2022
A RabbitMQ client for TypeScript, with functional programming in mind.

RabbitMQ-fp Lets feed our Rabbit' nicely ?? This repository contains a wrapper over amqplib written in Typescript with an accent of functionnal progra

MansaGroup 3 Sep 6, 2022