So these perfect situations where you only do the same thing and call same code over and over never happen; never!
Anyways, GO isn't popular for its RAW perf, GO is popular because:
- Simple language
- Native code
- GC
- Cross compilation
- Fast iteration (build/rebuild/deploy)
- Relatively tiny, statically compiled executable
So simple it can't do Object.keys()
Don't get me wrong, I enjoy writing code in Go, Rust, and TS. But my god, Go literally is a pain in the ass every time I want to do something that isn't a map reduce problem. And even for map reduce problems it's annoying due to lack of generics.
Maybe generics will finally give Go something that every other language has. A strong, useful, standard library for collections.
Simple on paper, but what's the experience as a result? some are okay with it, some love the restrictions and limitations, but i personally don't enjoy them
But again, i can understand the choices and the benefits
You can use ReadyToRun[0] to pre-JIT portions of the code for faster startup. Full AOT compilation is in the works too[1] albeit it's still experimental.
[0]: https://docs.microsoft.com/en-us/dotnet/core/deploying/ready...
[1]: https://github.com/dotnet/runtimelab/tree/feature/NativeAOT
Stop using serde. please.
And on top of that iteration time is hurt because of both the language, the compiler perf, and the lifetime problems that you need to constantly think about
The benefits of using rust on other hand is non-negligible, i wish the team would focus on solving that kind of immediate problems
That doesn't sound right. .Net has good support for caching of generated native code. It's well ahead of Java in this regard.
I use Go because its decently fast, I like the syntax, has a great stdlib, and I feel like it’s very easy to share a Go codebase with other engineers.
The other day we reviewed some oldish and complex code and it was so plain to see what it was doing and get back into the flow of that logic. I don’t find this happens with other languages as much.
I’m not saying Go is the right tool everywhere for everyone. I do love that about it though.
I have never had that same familiarity from Python, Ruby, JavaScript. I think there's something to be said about that in Go's favor.
That makes it very hard to read go code and build a mental model in your head.
Verbose does not equal complex usually.
Something that's a single method call on a built-in type may be 3 lines in Go. This doesn't make it hard to understand or keep in your head. "This iterates over a map" is the same regardless of the lines of code. You can very quickly skim verbose code, especially in a language like Go, where idioms and conventions are identical across many code bases.
Go's interfaces in particular feel like a really easy way to build clean, composable abstractions that make sense and hide complexity in the right way. The single-function-interface pattern is really one of my favorite things about Go lately.
Code legibility is starting to become a primary if not the primary factor for a lot of software these days, because that's what allows it to be maintained.
I think more analysis should be done on why this is for go. Java and C# should be similarly legible, they are not complex languages either. It's possible that go encourages certain paradigms.
It may take some scanning to go through all the dumb code, but you typically won't get fooled by abstractions. Go offers so little in terms of abstractions that you can usually see right through them.
This won't be everyone's experience, but it has been mine very consistently across internal and 3rd party code.
peope who say that they can just save money in their colo are probably never even working in the scale of discord, which is fine.
You have to understand that the programming language is a product in same way as anything else and there are influencers, marketing bribes, paid advertisements, forum/hn/fb/... paid spammers, etc.
Just remember what spam spike the Rust (I am again not talking about rust as a language... just about the noise everyone made) had here when it emerged, they threw the shadow on the Nigerian spam, oh the amount of noise from Rust-Distributed-Evangelist-Task-Force (they will probably downvote me to hell for mentioning this :D), I had a lot of fun reading HN at that time, the most used word was 'and', the second was 'rust', it was so exaggerated that it was like watching Monty Python.
In today world the only review, or if you want, benchmark, is the one you make. Nothing else counts and if you feel that C# is faster then enjoy using it.
And quite frankly, who cares about speed today (except some very strange people like me), people are using very strange languages and want to run them on backend. And they actually do. Ignore the benchmarks, no one cares (except those that would like to advertise themself like "faster than C" :D). Just threw in some more vapor on the cloud and you have "fixed" the speed issues. /s
Perhaps Go folks should just use inline assembly to demonstrate how useless these benchmarks are.
These benchmarks aren't intended to show the performance of everyday code. They show what experts can achieve on each platform. That's why they take pull requests instead of writing the code themselves from tutorials.
I'd still rather see the popular way of doing things be the benchmark.
However, time to market is almost always a priority. Unless my margins are razor-thin, spending twice as much on servers for shorter development cycles is a net win in most cases.
aspcore 7,016,966
gnet 7,010,982
People share results of benchmark where some languages are missing.
If we’ve learned nothing from Java and Python, it’s that managing runtimes and environment can be a huge pain point.
EDIT: swipe keyboard put ringtone instead of runtime and I missed it. Corrected.
This confused the hell out of me until I realized it's supposed to be runtime.
It's never been clear to me why someone would want this.
Not true since .NET Core 3.
$ dotnet publish --self-contained --runtime osx.11.0-x64 -p:PublishSingleFile=true
In .NET Core 3, you can build and distribute a single-file executable which, when run, will actually unpack an executable and a ton of DLLs into a temp directory, and run it from there.
In .NET 5 they changed it, so that when you build a "single-file" executable, you actually get an executable plus a few DLLs, which must be distributed together.
Python OTOH...
In Go, the scheduler is smart enough to stop something even when it's not blocking on IO. This makes it more robust.
Of course, use what you need for when you need it. Rust definitely shines in some circumstances.
C# grew the `await` operator in C# 5.0, released in August of 2012. Go altogether hit 1.0 on 2012-03-28. If the one is new, the other is new.
That said, C# and JVM are both mature and have decades of GC improvements, which could explain why golang is falling behind. Time will tell.
https://www.techempower.com/benchmarks/#section=test&runid=8...
High-level C# (asp.net) is almost twice as fast as GO in the benchmark... Rust is also in the top 3.
So, why should I use GO instead of C#, if ASP.NET/C# is so blazing fast and requires a lot less lines of code to achieve the same? -> It makes absolutely sense to switch to C# or Rust.