this post was submitted on 15 Jul 2023
29 points (87.2% liked)

Open Source

31358 readers
197 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS
 

C# is a useful object oriented programming language. You can generally do the same stuff as you can in C++ but as a game modder there is 1 huge advantage C# has over C++ and that's the way it handles include path orders, or it's lack thereof.

I actually typed out and described a scenario where this starts messing things up but it was quite verbose. But the tl;dr is that it's possible to get stuck in a situation where you have circular include dependencies (kind of like how circular dependencies screw you over really hard in Linux package managers sometimes). If you planned the structure of your code really really well this shouldn't be too big of a problem but if you're extending something that is both complicated and wasn't meant to be extended upon, it starts becoming a problem.

C# doesn't really have this problem because instead of including header files, it does that "using blahblahblah;" business which doesn't run into include order problems.

C# is "open source" but it was invented by Microsoft and is hard to use without dealing with Microsoft. I don't want to contribute to the agenda of proprietary software in any capacity so I make all my projects in C++. C++ is very powerful but for certain gaming-oriented use cases, while it is the best choice most of the time it's not the best choice all the time.

How do I use C# in a responsible and open-source way? Do I just have to avoid using visual studio? I don't own a single Windows or Mac computer that actually boots up. Do I avoid dotnet framework? Do I have to avoid everything dotnet? What about Net Core?

Typing g## into a terminal window isn't a thing so what's the FOSS way to use C#?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 9 points 1 year ago* (last edited 1 year ago)

I personally use C# via Visual Studio only so I don't have too much experience outside of this, but I know Visual Studio Code has a C# extension and VSCodium should also work. If you are set on really not using as much of Microsoft's products as possible, you will still have to use the dotnet sdk. From the terminal you would then call dotnet such as dotnet new, dotnet build, dotnet run, etc.

https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet

dotnet sdk is open source -> https://github.com/dotnet/sdk