by pharmakom · 3y ago · 0 comments
Also, Go doesn’t have inheritance, but does have interface forwarding and structural (as opposed to nominative) type-system - those both very significant factors that influence final program design.
In C# you must write explicit async/await keywords whereas in Go it is implicit, but the code reads almost the same.
I would argue against using implementation inheritance generally and interfaces sparingly in C# anyways.
As an aside pipelines are terriblely unergonomic. The public APIs are not fully developed and something simple, like IDK creating an actual processing pipeline, is funky as all hell. Creating a pipe wrapper feels dirty.
The buffer management is cool though and sequence seems like it should have just been made a first class slice type..
See https://learn.microsoft.com/en-us/dotnet/standard/io/pipelin...
The main problem it seems to solve is processing a text or byte range from a stream (be it an endless SSE/WebSocket stream of messages, or just from a huge (multigigabyte+) file on disk - in a non-blocking/async manner.
It's not free, but VS isn't either for any serious commercial usage, and Rider is certainly worth the money.
...but the .NET runtime has a higher memory floor. It's a lot easier to write very small apps in Go. New versions are working on stripping in AOT builds but it's still very much a work in progress