Need advice about which tool to choose?Ask the StackShare community!
C# vs Go: What are the differences?
C#: Simple, general-purpose, object-oriented programming language for the .NET platform. C# (pronounced "See Sharp") is a simple, modern, object-oriented, and type-safe programming language. C# has its roots in the C family of languages and will be immediately familiar to C, C++, Java, and JavaScript programmers; Go: An open source programming language that makes it easy to build simple, reliable, and efficient software. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.
C# and Go can be primarily classified as "Languages" tools.
"Cool syntax", "Great lambda support" and "Great generics support" are the key factors why developers consider C#; whereas "High-performance", "Simple, minimal syntax" and "Fun to write" are the primary reasons why Go is favored.
Go is an open source tool with 60.4K GitHub stars and 8.36K GitHub forks. Here's a link to Go's open source repository on GitHub.
According to the StackShare community, C# has a broader approval, being mentioned in 697 company stacks & 1163 developers stacks; compared to Go, which is listed in 901 company stacks and 606 developer stacks.
Go is a way faster than both Python and PHP, which is pretty understandable, but we were amazed at how good we adapted to use it. Go was a blessing for a team , since strict typing is making it very easy to develop and control everything inside team, so the quality was really good. We made huge leap forward in dev speed because of it.
Context: Writing an open source CLI tool.
Go and Rust over Python: Simple distribution.
With Go and Rust, just build statically compiled binaries and hand them out.
With Python, have people install with "pip install --user" and not finding the binaries :(.
Go and Rust over Python: Startup and runtime performance
Go and Rust over Python: No need to worry about which Python interpreter version is installed on the users' machines.
Go over Rust: Simplicity; Rust's memory management comes at a development / maintenance cost.
Go over Rust: Easier cross compiles from macOS to Linux.
I was considering focusing on learning RoR and looking for a work that uses those techs.
After some investigation, I decided to stay with C# .NET:
It is more requested on job positions (7 to 1 in my personal searches average).
It's been around for longer.
it has better documentation and community.
One of Ruby advantages (its amazing community gems, that allows to quickly build parts of your systems by merely putting together third party components) gets quite complicated to use and maintain in huge applications, where building and reusing your own components may become a better approach.
Rail's front end support is starting to waver.
C# .NET code is far easier to understand, debug and maintain. Although certainly not easier to learn from scratch.
Though Rails has an excellent programming speed, C# tends to get the upper hand in long term projects.
I would avise to stick to rails when building small projects, and switching to C# for more long term ones.
Opinions are welcome!
Pros of C#
- Cool syntax319
- Great lambda support268
- Great generics support243
- Language integrated query (linq)187
- Extension methods161
- Properties with get/set methods76
- Automatic garbage collection75
- Backed by microsoft69
- Automatic memory management57
- Amaizing Crossplatform Support53
- High performance28
- Beautiful27
- LINQ24
- Great ecosystem of community packages with Nuget21
- Vibrant developer community18
- Dead-simple asynchronous programming with async/await13
- Great readability12
- Strongly typed by default, dynamic typing when needed9
- Productive8
- Easy separation of config/application code7
- Visual Studio - Great IDE7
- Open source6
- Object oriented programming paradigm6
- Events management using delegates5
- OOPS simplified with great syntax5
- Operator overloading5
- Conditional compilation4
- Organized and clean3
- High-performance3
- Coherent language backed by an extensive CLR3
- Cool3
- Comprehensive platform libraries3
- Great community3
- Good language to teach OO concepts3
- Linq expressions2
- Top level code2
- Concise syntax, productivity designed2
- Unity2
- Lovely1
- Interfaces1
- Interfaces0
Pros of Go
- High-performance511
- Simple, minimal syntax375
- Fun to write343
- Easy concurrency support via goroutines289
- Fast compilation times261
- Goroutines183
- Statically linked binaries that are simple to deploy173
- Simple compile build/run procedures144
- Backed by google129
- Great community125
- Garbage collection built-in46
- Built-in Testing40
- Excellent tools - gofmt, godoc etc36
- Elegant and concise like Python, fast like C33
- Awesome to Develop28
- Flexible interface system22
- Used for Docker21
- Great concurrency pattern21
- Deploy as executable18
- Open-source Integration17
- Fun to write and so many feature out of the box14
- Its Simple and Heavy duty11
- Easy to read11
- Powerful and simple10
- Go is God9
- Safe GOTOs9
- Easy to deploy9
- Hassle free deployment7
- Rich standard library7
- Concurrency7
- Best language for concurrency7
- Easy setup7
- Used by Giants of the industry6
- Simplicity, Concurrency, Performance6
- Clean code, high performance6
- High performance6
- Single binary avoids library dependency issues6
- Simple, powerful, and great performance5
- Cross compiling5
- Garbage Collection4
- Excellent tooling4
- Very sophisticated syntax4
- Gofmt4
- WYSIWYG4
- Kubernetes written on Go3
- Keep it simple and stupid2
- Widely used1
- No generics0
- Operator goto0
Sign up to add or upvote prosMake informed product decisions
Cons of C#
- Poor x-platform GUI support11
- Closed source6
- Requires DllImportAttribute for getting stuff from unma6
- Fast and secure5
Cons of Go
- You waste time in plumbing code catching errors38
- Verbose23
- Packages and their path dependencies are braindead22
- Dependency management when working on multiple projects15
- Google's documentations aren't beginer friendly12
- Automatic garbage collection overheads10
- Uncommon syntax7
- Type system is lacking (no generics, etc)6
- Collection framework is lacking (list, set, map)2