Skip to content

Instantly share code, notes, and snippets.

@empijei
Created August 15, 2020 07:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save empijei/f9f97eac969e72f5106b0ba0f5760fcd to your computer and use it in GitHub Desktop.
Save empijei/f9f97eac969e72f5106b0ba0f5760fcd to your computer and use it in GitHub Desktop.

The short story of my experience with C# is that it is like Java should have been.

Cross platform

C# has now gotten to allow programmers to build cross-platform applications, includin games. Unity engine has made it possible to write games form most platforms in a memory-safe nice-to-use language.

IDE support

VS used to be the best possible IDE to work with and intellisense was just perfect and lightning fast for C#. Debugging was a flawless experience.

Builtin UI support

For a company that wanted to build desktop applications it was just a matter of drag-dropping components in the editor and the UI was ready. UX developers could just easily cooperate with the programmers as it was immediate to connect a UI component with the code that run on its events. If a company wanted to build a web app instead, they had ASP and MVC frameworks to do so.

Language Features

Getters and Setters

In Java it is quite bothersome to have to specify getters and setters for everything just in case future access to a private field would require to run some logic. C# addresses this smoothly: a field can just be a public field of a class and in the future it can always be refactored to have accessors and setters without modifying the user code. This is just one small example on how C# is built to scale.

Delegates

When C# introduced delegates it was the first widespread OOP language to provide such a feature, and it really made it possible to write new kinds of programs.

Thread support

Starting a thread was seamless and synchronization and orchestration primitives were easily available

Humongous standard library

The framework provided everything: from image manipulation to low-level network access (even if it felt all clunky IMO)

Where did they f**k up?

Async

The introduction of Async-Await is one of the few things that brought me away from it: the paradigm is terrible and it is a footgun most of the time.

Not really cross platform

As much as the language itself was cross platform, most of the stdlib was only available on windows

Forcefully OOP

OOP is limited and forces programmers to adopt slow (videogames have a pretty strong speed requirement) and counterintuitive patterns (building data-oriented or pseudo-functional code always felt wrong, like fighting the language)

IDE

VS got slower and slower and slower over time, it also only works on windows, so that was a big failure point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment