This is a guest blog post by Sam Cox. Sam is the Co-Founder & CTO of Tracebit.
When we started building Tracebit – a B2B SaaS security product – one of my key early decisions was to pick a programming language. While many startups gravitate toward Python, TypeScript, Golang, or Rust, I went a different way: C#.
I’ve blogged quite a bit about this decision before and I wanted to share a few highlights here.
Productivity First
I think a stack which lets you spend time on what actually matters is the core of a great developer experience. I wanted:
- an expressive, fully-featured language which would let us quickly test and refine ideas
- the assurance offered by static types when maintaining and refactoring code
- a stable platform that would still work well as our team and codebase grew
C# has allowed us to be highly productive from the earliest days and it feels like a really solid foundation to build on.
Modern, Open & Cross-Platform
I was pleasantly surprised to find that .NET is now fully open source and MIT-licensed. The cross-platform support lets us develop on MacBooks, and deploy to Linux containers on ARM cores. Microsoft’s “chiseled” container images are a nice touch too, giving us a lean deployment option which minimizes CVE management.
Popularity
Stack Overflow Developer Survey 2024
C# consistently ranks as a highly popular programming language, though perhaps without generating the buzz that some other languages might – especially among startups! This established presence gives us real advantages:
- A great talent pool from which to hire
- Plenty of world-class libraries at our fingertips
- Lots of documentation and examples when needed
- Well-traveled paths with fewer unexpected roadblocks
Rich Standard Library
The .NET ecosystem comes with quality libraries for just about everything we’ve needed. Along with the usual suspects (collections, JSON processing, etc), Entity Framework and ASP.NET stand out as excellent frameworks in which to build.
This has been particularly valuable for us as a security product. We have high standards for dependencies, and having so many trusted and well-maintained components available has saved us a lot of time!
Expressive language features
C# as a language has many nice features, such as LINQ, pattern-matching, anonymous functions, primary constructors and null-coalescing operators that make it both expressive and succinct. I’ve honestly found it a pleasure to read and write.
When it comes to the type system, I think C# has found a really nice balance – it’s powerful without feeling overly complex. I particularly like the support for generics, record types, and reflection.
Great Tooling
The development ecosystem offers some excellent tools:
- Powerful IDEs with great debugging and refactoring support
- Great static analyzers that will often suggest fixes automatically
- Sophisticated tooling for memory profiling and runtime diagnostics
These make it a joy to work with the language, and help avoid nasty surprises in production.
It’s Fast
Note: This graphic has been updated from the original post with the latest TechEmpower results.
While performance wasn’t our main reason for choosing C#, it’s certainly a nice advantage. It’s clearly a priority for the .NET team and each release brings meaningful performance improvements. We process a lot of data on behalf of our customers and I’ve been very impressed by the throughput we’ve been able to achieve with simple and idiomatic C# – while still offering many options to optimize hot code paths if necessary.
How It’s Going
After thousands of commits and over 100,000 lines of code, I’m very happy with our choice. We’ve brought on team members who had never used C# before, and everyone’s become productive surprisingly quickly – shipping code to production on their first day.
No programming language is perfect for every situation, and what works for us might not work for everyone. But C# has been a key part of Tracebit’s success so far. If you’ve overlooked C# based on outdated perceptions (like I almost did), I’d definitely recommend taking a closer look!
I was a member of a team that developed desktop applications in a corporation. There were two legacy applications that were both developed in C++ using Visual Studio. We dipped our toes into the .NET world (starting in .NET 1.1) by adding features using C# and calling the C# code from the C++ apps. After a while our product manager wanted to replace the two C++ apps with a single app. The software team decided .NET was the way to go. At this point the C# .NET desktop app has been shipping for many years...
“The most recently developed apps run on Android and iOS smartphones and are also C# .NET”
What tools or .NET framework did you use?
The desktop app started in .NET Framework 2.0 and is currently using .NET Framework 4.8. We used Visual Studio of various versions (keeping up to date as we went). We used NuGet for package management.
I’m less certain about the Android and iOS apps as I did not work on those directly. I believe they are currently using .NET 10.0 as they are also keeping up to date. They are using NuGet for package management.
Thanks for the article. I agree C# is the best. Just want to know how you obtained the performance measurements. Several years ago I was checking online info about C# performance comparison with other frameworks and it was quite good but not 3 times better than Java (if I remember correctly it was ~1.3-1.5 time better).
Thanks
Yep! Based on my many years of experience, I believe C# offers a powerful combination of modernity, versatility, performance, and a rich ecosystem, making it a fantastic choice for a wide range of development tasks.
Thanks Nick! That image is from Why choose .NET? which references TechEmpower Round 21 for those numbers.
Thanks!
Hi Sam,
Thanks for sharing your blog — I read it thoroughly and was reminded just how powerful the .NET really is.
As a .NET developer, I truly enjoy working with C# as well.
Appreciate the insights!
Appreciate .NET Team and community!
Best regards.