News for hackers. Stuff that matters.
Re:Java JIT vs. Java AOT vs. Go for Small, Short-Lived Proce... by btilly on Tuesday December 24, 2019 @03:49PM (#21874817)
I would imagine that Go’s GC is worse than the tunable JVM ones, but go isn’t powerful enough that one would ever be tempted to program in an abstraction heavy style.

That is a compliment.

One of the design criteria for Go was to push programmers away from being architecture astronauts whose abstraction heavy style results in having no idea how much work you are hiding in all of the layers. And that design criteria was based on analysis of the actual failure modes of significant software projects.

Therefore the fact that real world Go apps generally manage to avoid that failure more is a testament that they succeeded in this design criteria.

Re:Java JIT vs. Java AOT vs. Go for Small, Short-Lived Proce... by kod on Tuesday December 24, 2019 @07:32PM (#21875910)
Generics are architecture astronomy?

This is parroting anti-intellectual nonsense.

Re:Java JIT vs. Java AOT vs. Go for Small, Short-Lived Proce... by btilly on Tuesday December 24, 2019 @07:56PM (#21875997)
Generics as done in C++ templates lend themselves to that.

Inheritance as done in most OO systems does likewise.

You will note that the core Go team has a desire to add generics. However they also feel that it is a potential Pandora's box.

Re:Java JIT vs. Java AOT vs. Go for Small, Short-Lived Proce... by fauigerzigerk on Wednesday December 25, 2019 @06:40AM (#21878104)
Interestingly though, some of the worst excesses of overdesigned architectures in Java happened before Java even had generics, and heavy use of interfaces was a standout feature.

So Go has absolutely everything a true architecture astronaut needs. In my view, the big difference is cultural and has nothing to do with language features.

Also, the lack of generics often forces you to use reflection to avoid code duplication, which makes for very complex, error prone code.

As an example consider the sort package in Go's standard library. Here's what they had to write in order to generically swap two elements in a []interface{}:

https://golang.org/src/internal/reflectlite/swapper.go

Re:Java JIT vs. Java AOT vs. Go for Small, Short-Lived Proce... by Gibbon1 on Wednesday December 25, 2019 @07:09PM (#21881216)
I suspect a problem with Java is it's culture and ecosystem evolved in the early 90's when memory, disk, and processor speeds were doubling every few months.

Go in the late 2000s after Amdahl's law had been bitch slapping everyone for 10 years. Network bandwidth increased but laterncy didn't. Processor transistor counts increased but clock speeds didn't. Memory increased but memory bandwidth didn't keep up.

Re:Java JIT vs. Java AOT vs. Go for Small, Short-Lived Proce... by LessDmesg on Wednesday December 25, 2019 @02:40AM (#21877448)
C++ templates are not the gold standard of generics. In fact, they are a glorified text substitution system, totally broken and flawed.

Generics are still absolutely necessary for ANY serious programming language. They are required by the DRY principle. Algorithms must not need be repeatedly implemented for every new data structure. To say that generics are astronaut is simply unprofessional.

Re:Java JIT vs. Java AOT vs. Go for Small, Short-Lived Proce... by flavio81 on Thursday December 26, 2019 @03:50PM (#21886654)
>One of the design criteria for Go was to push programmers away from being architecture astronauts whose abstraction heavy style results in having no idea how much work you are hiding in all of the layers.

So they chose to create a language where there's no way to get around creating vast amounts of boilerplate. This boilerplate heavy code style results in having no idea of the true logic you are hiding in all of the boilerplate.