> - Being able to use an IDE with it’s full power is nice.
In my experience, Visual Studio is much slower when developing. My Python workflow affords a 200ms red-green-refactor loop, while VS is on the order of several seconds.
This might not seem like much, but it has a great impact on my engagement, flow, and satisfaction.
> Rebuilding the project to run the tests adds a bit of time, yes.
It costs money, but I've paid for NCrunch for a fair few years and find it invaluable for this reason. It doesn't even need you to save changes before it spots them and runs affected tests in the background.
If cost is an issue you can also start `dotnet watch test` going in a terminal/command prompt for non-interactive live-reload testing.
I am not so sure it's worth it. In general, developer time is much more valuable than machine time.
Maybe if you're building a large high-performance server, you should invest in performance. But otherwise, if you only look at at computational complexity, and batch up/avoid I/O when possible, you're fine.
I grew up with BASIC and made it to Java by way of assembly, C, C++ and C#. This year I put some Rust into production tooling. I've used python along the way, but usually as a scripting tool. I've never worked at a company whose codebase involves a lot of python. So beware of confirmation bias in my thinking.
What follows is my opinion, I am aware it is my opinion, but in my sphere of influence, it is not up for debate when it comes to writing code. It might occasionally be a conversation over lunch.
I put python in the same bucket as BASIC. It's not a production language. "developer time is much more valuable than machine time." Yes. Absolutely. Iteration speed is vital. But it is vital in more than just the test loop. It is important in the "minor refactoring of various classes" up to the "major refactoring of entire systems" loop too. And python just doesn't make that easy. It actively makes it difficult. It makes comprehension difficult. It's difficult to look at python code in a code-review and have a good idea of what the classes involved are. I don't even write scripts in it any more. I've found that any script that is worth writing is likely to grow and evolve over time, and if it is not written in something like C# or Java, then it will become an intolerable mess. I've seen entire organizations that are basically cargo culting.
I encourage you to learn a statically typed language and its tooling.
All of the benefits of static typing save a ton of developer time in other places. No one is talking about saving machine time as the primary benefit of static typing.
Static typing in .NET saves developer time on a massive scale. Sure, the compile times and startup times may be longer (and tests may take longer to run for that reason), but the languages also allow for editor/IDE tooling that boosts developer productivity massively. Visual Studio with Resharper or Rider may seem expensive, but if you work with these tools full time, they pay for their cost multiple times over in almost no time.
There is a delay, true. Inevitable with the compilation phase, and I do find it irritating that my Go stuff builds so much faster. That said, there's reasonable (not perfect) live reloading happening these days which helps somewhat.
As for the reasons:
- Static typing and C# projects makes code organization and refactoring dead easy.
- Modern C# doesn’t require that much boilerplate, and has features that allows a developer to speed up development, like Python.
- EF Core covers everything I need from SqlAlchemy/Alembic.
- LINQ is an awesome way to work with collections. Type safe DB queries comes handy both when developing and refactoring.
- ASP.NET covers everything I need from flask/Fastapi.
- More speed and lower resource usage is nice.
- Being able to use an IDE with it’s full power is nice.
My main reason to switch was static typing, and my only requirement was a good ORM comparable to SqlAlchemy. The rest is just bonus.