Moving Off of Typescript, 2.5m Lines of Code
Posted4 months agoActive3 months ago
engineering.usemotion.comTechstory
calmmixed
Debate
60/100
TypescriptC#.netBackend Development
Key topics
Typescript
C#
.net
Backend Development
A company shares its experience of migrating 2.5M lines of code from TypeScript to C# on the backend, sparking a discussion on the pros and cons of different programming languages and technologies.
Snapshot generated from the HN discussion
Discussion Activity
Active discussionFirst comment
3m
Peak period
11
0-6h
Avg / period
4.1
Comment distribution29 data points
Loading chart...
Based on 29 loaded comments
Key moments
- 01Story posted
Sep 17, 2025 at 11:42 AM EDT
4 months ago
Step 01 - 02First comment
Sep 17, 2025 at 11:44 AM EDT
3m after posting
Step 02 - 03Peak activity
11 comments in 0-6h
Hottest window of the conversation
Step 03 - 04Latest activity
Sep 20, 2025 at 10:37 PM EDT
3 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45277193Type: storyLast synced: 11/20/2025, 1:08:48 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
Main pain points with TS have become more obvious as the team grew and the codebase resulted in a multitude of different models representing the same thing.
- Prisma model representing the things (plural because Prisma generates a ton of variants for the different read/write scenarios) going in/out of the DB
- Zod models for OpenAPI generation
- Zod models for deserialization where we have `jsonb`
- DTO models at the boundary
- Additional front-end payload models that wrap the DTOs
A developer building a simple API endpoint do to a read will often up writing a handful of models for the same entity to move it back and forth...A lot of this work simply ends up being related to the loss of runtime types requiring a lot more modeling work creating a spaghetti of Zod and types.
Lots of papercuts in day-to-day and increasingly difficult to get otherwise competent engineers onboarded.
At least I'm not under the impression that this is a Silver Bullet. Will C# make it better? We'll see!
While you won't be able to share your back end models with the front end, OpenApi spec generation is pretty much automatic so you can generate the models or client code.
C# is a much better choice to use for the backend and also a better designed language in general.
I think the big gains come from a more mature ecosystem of things that "just work". e.g. EFC vs Prisma or Drizzle with EFC having, for example, automatic change tracking and automatic up/down migrations.
The two NPM supply chain attacks this week also highlight another issue with the ecosystem in general.
We'll see how this change goes and evolves in Motion; C# is still relatively rare for startups, but at series C, it's no longer a seed stage startup and it increasingly feels like "it's just another distributed enterprise backend" (or at least it should be).
In many cases, the bias comes down to perception — .NET is seen as “enterprise” or “legacy,” while in reality it’s open-source, cross-platform, and very well-supported by Microsoft and the community. For a startup that needs stability and performance without reinventing the wheel, .NET can be a huge win.
One sticking point is that the tools, while community and small projects, are all behind a license. But, they are free for small teams making under something like $1M/year in revenue.
Rider should make anyone who is used to JetBrains' other products fairly happy.
Love C#. Performance is fantastic. The framework and tooling are very mature (with exceptions like hot reload ugh). Entity Framework is amazing, by far the best ORM I've ever used.
I don't feel like an expert by any means but I'm productive. Some days I do hit some stuff that takes me longer that I would've hoped but I've been able to solve everything I've faced.
I only use it for APIs though. The fullstack stuff is not great. Maybe if Microsoft improved hot-reload I would consider Razor with a Vite setup. Blazor is just useless for me. It's very cool from a technical standpoint but your frontend is 10x slower and more bloated than the worst JS solution you can think of.
I connect my JS frontend layer with OpenAPI[1]. It's been ok but the whole OpenAPI experience is not as smooth as I had hoped.
[1] https://openapi-ts.dev/
(just realized in my previous comment I didn't specify I meant Blazor with WASM)
There is a positive aspect to this, as it makes decisions easier as well. For many areas there is often a single good choice, there aren't dozens of web frameworks you have to evaluate. There's ASP.NET Core and then nothing else for a long time. And for the most part those are pretty good, so it does not feel limiting.
And C# doesn't have to be too enterprisy and over-abstracted. The community does tend a bit too much towards unnecessary abstractions in my opinion, but you don't have to use it that way.
People say this but is it really the case? Look how much NPM has been attacked by malware recently, and all because people are indirectly installing simple colour libraries that are 20 layers deep of dependencies of dependencies. Then you get the fucking stupid stuff like `is-odd`.
On the other hand, I have nearly 20 languages under my belt and have been writing code professionally for 22 years -- I still use C# most of the time for a lot of other reasons, just this is one of the bigger pain points.
Absolutely no reason other than "C# icky" -- they ended up with a platform that is crazy fast (and fast scales way easier, it handles a dumb amount of traffic without a lot of crazy design)
Startup culture is toxic AF at times, bad engineering decisions for cargo cult stuff.
You have to be absolutely insane and/or highly inexperienced to even consider Javascript/Typescript on the back-end. Not only is the language a terrible match but the deep architectural failings of NPM have been clear for at least a decade.
Typescript ORMz lol.
Soft deletes make indexing, well, problmatic to say at least. Use temporal tabls instead for point in time recovery. Nevertheless it could have been solved on a database level without any help from ORMs, lookup RLS. Still, screws up indexing strategy.
I love C#, I use it every day, but who makes a decision like this?