But you must understand your Java app won’t have performance advantage because of faster alloc speed IRL: GC will take lots of CPU, because Go’s one is much easier at memory release. You can only see allocation advantage in micro benchmarks where the app stops before the GC will start.
1. It enhances readability
2. It would be a surprise to you: oneof actually enhances type safety. It is just lacking type system of Go where you cannot express the feature and thus loses type safety.
Protobuf has first class enum support and also provides a thing called "oneof". Go doesn't have anything of this.
So, it is clearly not the right tool for the job. Sorry guys, you are wasting your time sticking to Go constructs only.
Spark is not just written in Scala, they shared the same philosophy of underthought design.
Luckily, there's a little reason of using Spark after Yandex released their Clickhouse: it better compresses data, it is much faster, it doesn't need crazy infrastructure of low quality Apache's code, it can be used in a realtime which is really huge.