HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
CharlieDigital
js-ts-csharp
C#2022–2025
CharlieDigital / js-ts-csharp

js-ts-csharp

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

2Distinct people
18Mentions
0Explicit recommenders
158GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

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

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year18 dated mentions

Observed mentions: 2022-03-13 12:38:20 UTC to 2025-02-20 14:18:36 UTC.

02462022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC312
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC606
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC505
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC404

What Hacker News says

18 sources
> The dx typescript brings to these types of applications is nice. Ironically, it only gets halfways there. What I've found is that teams that want TS probably should just move up to C#; they are close enough [0]. The main thing is that once you start to get serious with your backend API, then data integrity matters. TS types disappear at runtime and it's just JS. So you need a Zod or Valibot to validate the incoming data. Then your API starts getting bigger and you want to generate OpenAPI for your frontend. Now your fast and easy Node/Express app is looking a lot like Spring or .NET...without the headway and perf...the irony. [0] https://github.com/CharlieDigital/js-ts-csharp
In Show HN: Mastra – Open-source JS agent framework, by the developers of Gatsby
Kinda disagree on C# It's actually converging with JS and TS Small repo: https://github.com/CharlieDigital/js-ts-csharp Edit: but I don't want to dismiss either because C# does cover a large gamut of use cases (desktop, 3D/gaming, COM interop, etc.) and it is true that in some use cases, you may see a wider range of keyword soup compared to just building web APIs (where I think it really shines; this is a .NET web API in 4 lines: https://imgur.com/a/simple-net-api-with-route-param-validati...).
In One year after switching from Java to Go
> ...no one I know is excited about working with GoF-style OO code these days FYI, this is C#: var namedFunctions = new Dictionary<string, Func<int, int, int>>() { ["multiply"] = (int x, int y) => x * y, ["add"] = (int x, int y) => x + y, ["subtract"] = (int x, int y) => x - y, ["divide"] = (int x, int y) => x / y, }; log(namedFunctions["add"](x, y)); This is also C#: var multiplyN = (int[] numbers) => numbers.Aggregate(1, (a, b) => a * b); var addN = (int[] numbers) => numbers.Aggregate(0, (a, b) => a + b); var subtractN = (int[] numbers) => numbers.Aggregate(0, (a, b) => a - b); var divideN = (int[] numbers) => numbers.Aggregate(1, (a, b) => a / b); log(multiplyN(new[]{1, 2, 3, 4})); log(addN(new[]{1, 2, 3, 4})); log(subtractN(new[]{1, 2, 3, 4})); log(divide
Read the rest
N(new[]{1, 2, 3, 4})); As is this: // Return a tuple var runCalcsAsTuple = (int[] values) => { return ( multiplyN(values), addN(values), subtractN(values), divideN(values) ); }; // Destructure the tuple var ( multiplyResult, addResult, subtractResult, dividResult ) = runCalcsAsTuple(new [] {2, 3, 4, 5}); Named tuple types are also kinda interesting: using Profile = ( string Username, (string Hn, string Mastodon) Socials ); var profile = GetProfile(); var (hnHandle, mastodonHandle) = profile.Socials; Profile GetProfile() => ("chrlschn", ("CharlieDigital", "@chrlschn")); If you haven't looked at C# in a while, I'd recommend taking a look with a fresh set of eyes. Small repo with examples comparing C# to JS and TS: https://github.com/CharlieDigital/js-ts-csharp
In Why Tracebit is written in C#
> I do think C# is by far the best mainstream language C# is a hugely underrated language that I feel like often gets overlooked when teams look to move beyond JS/TS. The language has a pretty tight syntactic congruency to JS/TS[0], Entity Framework is pretty amazing in terms of DX/perf/maturity, and it seems like we should see more C#/.NET it in the wild than we actually do. My sense is that there are some legitimate reasons to pick something like Kotlin (JVM ecosystem), but a lot of folks that might have worked with C# in passing in the .NET Framework days simply haven't given the ecosystem another look. It's productive, stable, performant, and secure. VS Code support is really good and Rider has a community license available. [0] https://github.com/CharlieDigital/js-ts-csharp
In An update on Dart macros and data serialization
Really good. I'm in a startup using .NET. We deploy to a variety of targets including AWS t4g (Arm64) instances in AWS as well as x86/64 targets in GCP. All devs are on M1 Macs. Our build pipeline is GitHub Actions Linux runners. Our DB is either AWS RDS Postgres or GCP Cloud SQL Postgres with a mix of EF Core as ORM and Dapper (for more complex read queries). C# has, over the years, converged with TypeScript so they are very similar[0] (though no Duck typing in C#). Good mix of OOP and FP paradigms borrowed from F#. F# interoperates with C# so it can tap into the larger C# ecosystem. It's a good platform; very productive. CLI has a functional hot reload (much more limited than Node on JS as the granularity of module replacement isn't quite as good). [0] https://github.com/CharlieDigital/js-ts-csharp
In Rust needs a web framework
I find C# and TS to largely be "congruent" and rather easy to switch between [0]. I think the biggest "growing pain" is that C# runtime is multi-threaded so devs that are used to single-threaded Node.js environment need to understand object lifetimes. (Of course there are other differences as well, but the biggest IMO is understanding threading and object lifecycles in the underlying runtime.) Syntactically identical promises/futures; syntactically identical lambdas; largely congruent tuples, classes, interfaces, generics, anonymous objects. C# 13 collection initializers are going to largely feel like JS array initializers. Minor syntax differences can be picked up quickly. Frameworks like Nest.js are super similar to .NET Web API. [0] https://github.com/CharlieDigital/js-ts-csharp
In Ask HN: Why are people paying so much for Vercel?
I was a long time Windows .NET Framework dev and switched to TypeScript + Node for a while because that's what all the startups were using and thoroughly enjoyed it. One thing that stood out to me in particular was just how fluid it is working with types in TS and also how good the unit testing story is on Node. Then switched back to .NET 6 when I joined another (rare) startup using C#/.NET for the backend. .NET now is a fantastic backend platform and I've been very pleasantly surprised. Part of it is that the base framework now feels really complete and well put together -- it feels "batteries included", but with the Duracell branded batteries and not the cheap knockoffs. The Entity Framework ORM didn't seem as competent in the .NET Framework days, but now EF Core is really, really good; highly performant and ergonomic to use. Part of
Read the rest
it is that the multi-platform capabilities matured a lot since the 4.8 Framework days; the team I'm on is all macOS and we deploy to a mix of AWS t4g Arm64 instances. Part of it is that there's no longer a hard dependency on Visual Studio for most workloads; the team is a mix of VS Code and Rider. What really stood out to me after that stint with TS is how close TS and C# have become[0] and even more so with the more recent releases of C# 12. I think it's probably easier for teams that are working with TS + Node to add C#/.NET workloads than any other language/runtime like Go or Rust when there is a benefit to add multi-threading or get higher throughput from some backend system. [0] https://github.com/CharlieDigital/js-ts-csharp
In Swift sucks at web serving or does it?
> the complexity of getting async “right” For most single-context use cases, it's no harder or difficult than async/await in JavaScript and hardly anyone would call JavaScript "complex". Promise (JS) = Task (C#) Promise<T> (TS) = Task<T> (C#) Promise.all() = Task.WhenAll() For multi-context use cases, there's just a bit of awareness required to understand that you may need continuation on the original thread and awareness of context-sensitive resources. But if you're building web API backends, most of the time, it's not a concern and async/await works (mostly) like JS because the dependency injection container is playing a big role in handling object scopes. C# has to be one of the more approachable languages for most teams that are already versed in JS/TS because of the similarity[0] and influence of C# on JS and TS (JS as
Read the rest
ync/await came after C#; same for JS lambdas) [0] https://github.com/CharlieDigital/js-ts-csharp
In Asynchronous Programming in C#
One fundamental difference is that if you are building a React or Vue static app, you're going to need a backend anyways. If you're building a React or Vue SSR app (Next.js, Nuxt.js), you'll probably want a separate backend anyways. If you're going to have a separate backend, .NET has some advantages compared to Node that's worth considering. It's higher throughput than Node for the same compute resources, it's multi-threaded and you can run background workers in-process, it has some nice built-ins for concurrent processing (Task Parallel Library, System.Threading.Channels), the nuget ecosystem is less prone to security risks compared to NPM [0], EF Core is a really mature ORM and possibly one of the best ones out there for productivity, it has serviceable hot reload for productivity, and modern C# is really, really close to JS and TS i
Read the rest
n syntax [1]. One often overlooked advantage for high security contexts is that .NET has a large standard library that's maintained by Microsoft for really core things like encryption, hashing, database drivers, network code, etc. You get the benefit of having an army of professional engineers maintaining that core code and patching it when security issues arise versus the Node/NPM ecosystem's strong dependency on the community. C# and .NET are the backend runtime that most teams probably want when they think of moving on from Node to Elixir, Go, or Rust because of how close it is to TypeScript now. And if you're going to use .NET on the backend, then why not consider Blazor for SSR and static HTML? (Disclaimer, I'm not a big fan of Blazor, but I can see why teams would choose it). [0] GitHub State of the Octoverse 2020: https://octoverse.github.com/2020/static/github-octoverse-20... [1] https://github.com/CharlieDigital/js-ts-csharp
In .NET 8's Best Blazor is not Blazor as we know it
The thing is, if you're comfortable with TypeScript, it's really more or less just a small step to C#; the Venn diagram of the most commonly used keywords between TS and C# has a high degree of overlap. A small repo here: https://github.com/CharlieDigital/js-ts-csharp And a practical example of a Playwright web scraper in C# and TypeScript: https://github.com/CharlieDigital/playwright-scrape-api "Too many keywords" is the weirdest objection to a programming language versus actually using the language to build something practical. Edit: I'm actually curious as to which keywords you personally found the most challenging to grok or what tipped the scales of "this is too complicated".
In We migrated to SQL. Our biggest learning? Don't use Prisma
I would just like to understand specific threats or issues with using C# as a language. I've used it for 20 years at this point without issue and the latest IEEE language survey shows that it remains one of the top languages[0]; I'm wondering if you have some insight into why .NET and C# are a bad choice for engineering teams that I've somehow overlooked in my 20 years of working with it. It sounds like your argument is "because Microsoft". If you are using VS Code, GitHub, or TypeScript -- well, all those are also controlled by Microsoft, aren't they? Microsoft is the biggest investor in OpenAI and in fact offers their own Azure labeled OpenAI -- are you going to give up on OpenAI because it's Microsoft controlled? React is controlled by Facebook. Go is controlled by Google. So what? Why use C#? - It's a very small step from Type
Read the rest
Script to C# if a team needs higher throughput on the backend[1][2] - `System.Linq` provides a superset of JS Array methods and is easy to map from one to the other. - It's performance is on par or superior to Go[3] and competitive with Rust[4] while being much easier to adopt because of the language similarity to JS and TS. - It is an object-functional hybrid language owing to its influence from F#[5]; discriminated unions are on the roadmap and available today with packages like Dunet and OneOf, it has pattern matching like Rust, extension methods provide flexibility in modelling, named tuples in C# 12 converge even more with TS, it supports destructuring record types and classes, it has immutable record types - Minimal APIs are very familiar for teams using Express but need more performance. I'd actually say that it's a bit simpler than Express on Node for common use cases since there's nothing to import when setting up minimal APIs since it's all first-party Microsoft. - Platform support for source generators are a revelation; it removes a lot of boilerplate code while actually improving performance over reflection. - Many of the things teams love about modern JS actually have influence from C#. Lambda expressions in JavaScript, `async/await`, and more. In fact, C# and JS/TS have been converging (see the linked repo). - It's relatively easy to write high throughput code in C# with support for both concurrency (Tasks + Channels) and high level abstractions for parallelism (Task Parallel Library) as well as full access to threading. - C# allows easy access to underlying low-level primitives; you can program with high level abstractions for productivity but still have access to call `unsafe` code if needed. - EF Core is possibly the best ORM on the market right now in terms of performance, ease of use, maturity, and database engine support. - A benefit of a language and runtime backed by Microsoft and used in the enterprise is that security issues get addressed by a team of professional engineers; you don't see the same types of security issues that pop up in the Node/NPM ecosystem. - This is a big boon particularly because of the broad standard libraries and first-party libraries for many use cases. Rather than importing unknown dependencies for common use cases, you end up with a baseline of professionally maintained, OSS code. - GitHub's State of the Octoverse report in 2020[6] showed that C# had the least Dependabot alerts and has the least transitive dependencies (less prone to security issues via package managers). - As a general purpose language, it can be used in many domains from desktop to devices to web to gaming (both Godot and Unity; RyujinX). - It's also quite mature and stable while languages like Rust are still ironing out async and Go just released generics. C# has been there; done that. My personal opinion is that C# is the language that most teams want but don't know enough about it or have a bad taste from the .NET Framework days. While the runtime is more complex than Node, the language is very similar to TypeScript owing to its lineage from Anders Hejlsberg. C# and .NET in its current form is a great language and platform to build on. Besides, if a team is already using VS Code, GitHub, and TypeScript, they're already in the Microsoft controlled ecosystem. [0] https://spectrum.ieee.org/the-top-programming-languages-2023 [1] https://github.com/CharlieDigital/playwright-scrape-api [2] https://github.com/CharlieDigital/js-ts-csharp [3] https://medium.com/servicetitan-engineering/go-vs-c-part-3-compiler-runtime-type-s… [4] https://www.techempower.com/benchmarks/#section=data-r21&test=composite&hw=cl [5] https://itnext.io/getting-functional-with-c-6c74bf279616 [6] https://arxiv.org/ftp/arxiv/papers/2110/2110.10246.pdf
In Why isn’t dotnet core popular among startups?
The fact that Functions are Objects that can have properties/methods is supremely undervalued. Are there other languages that do this so nicely? It's the perfect blend of OO and functional. Yes. C#. The equivalent are `Func` and `Action` types representing functions with a return and without a return. In fact, the JavaScript lambda expression looks awfully familiar to C#. One of the snippets below is C# and the other is TypeScript: var echo = (string message) => Console.Write($"You said: {message}"); var echo = (message: string) => console.log(`You said: ${message}`); The same signature in C# and TypeScript: var Apply = (Func<string, string> fn, string input) => fn(input); var result = Apply(input => ..., "some_string"); var apply = (fn: (input: string) => string, input: string) => fn(input)
Read the rest
var result = apply(input => ..., input); The C# can version can also be written like: var Apply = (Func<string, string> fn, string input) => fn(input); var lowercase = (string input) => input.ToLowerInvariant(); var result = Apply(lowercase, "HELLO, WORLD"); For the curious, I have a small repo that shows just how similar JavaScript, TypeScript, and C# are: https://github.com/CharlieDigital/js-ts-csharp Screen grab of the same logic in JS/TS/C# showing the congruency: https://github.com/CharlieDigital/js-ts-csharp/blob/main/js-...
In TypeScript is surprisingly ok for compilers
> ...this project is a nice showcase how versatile C# and .NET is C# and .NET are highly underrated/underappreciated because of some early flops and the Microsoft branding. It's converging with TypeScript in the best way possible[0] and has some really great language features that even TS is lacking (really powerful switch expressions, for example). It seems like the natural option for teams that want to move from TypeScript to a compiled, multi-threaded, statically typed language but it seems that there's a lot of teams that would rather use Go or Rust; neither of which are as easy to step up to from TypeScript, IMO. I think if Microsoft were to make a T# -- which removes some of the legacy cruft from C# -- it would blow minds. [0] https://github.com/CharlieDigital/js-ts-csharp
In Ryujinx: Experimental Nintendo Switch Emulator written in C#
> I believe that Rust is a fabulous language for early prototypes. The problem is that TypeScript is an even better language for early prototypes. zeroxfe has the right answer: > If your answer is something like Go or Node.js, then Rust is probably not the right choice. > If your answer is C or C++ or something similar, then Rust is very likely the right choice. The only reason one would choose Rust over TypeScript is if one would have chosen C/C++ instead. Then if you need higher perf/throughput: Go, Java, and C# in particular are all options that I'd consider before C/C++ or Rust. C# in particular is highly congruous to TypeScript [0]. JavaScript, TypeScript, and C# have been converging, IMO (and that's a good thing). Seems really natural that if you're a startup finding PMF, start with TypeScript for iteration speed. If you need hig
Read the rest
her throughput, C# is a stone's throw away from TypeScript syntactically and it's pretty easy to hire for (compared to Rust). [1] Pick Rust if you're building something highly performance and memory sensitive. Pick TypeScript and C#/Go/Java for almost all other cases. [0] https://github.com/CharlieDigital/js-ts-csharp [1] https://raw.githubusercontent.com/CharlieDigital/js-ts-cshar...
In I love building a startup in Rust but wouldn't pick it again

Showing the 15 most recent of 18 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.