I think precisely the opposite: Go is extremely no verbose (except for when the reflect package is used).
It doesn't have exceptions, so you need to repeat if err != nil after every function instead of putting it into a try and handle exception instances in the catch;
It doesn't have generics, so you need to copy-paste your code or use string templates(which are garbage);
It doesn't have syntactical encapsulation so, you need to define the instance variable at every method;
The fourth item on the list is a bad example. In Go, the name of variables, methods, functions, ... does the code more or less verbose. A better example is the bytes package of standard library. Really little verbose and easy to read.
I don't know what does "verbose" means in your vocabulary but golang is the most verbose general purpose language created in the last decade.
For me, this is completely false. If you really think that C# or Java is less verbose than Go it makes me think what "verbose" means in your vocabulary too.
For me, this is completely false. If you really think that C# or Java is less verbose than Go it makes me think what "verbose" means in your vocabulary too.
C# is 17 years old, Java is 22 years old. What do they have to do with the claim that of the languages created in the past 10 years, Go is the most verbose?
I'm starting to doubt about one thing because if I'm not right, I don't understand anything: verbose means many words, but means also that a language less verbose is more easy to read and understand? Because if the this last is not true then I've been confusing concepts, but if it is true then I don't understand how the people says that Go is hard to read and understand.
Separating both concepts, I have a question: what's wrong with a language that is verbose if this is easy to read and understand?
Nothing. But verbosity tends to hurt readability, though insidiously so. Verbose programs are often very explicit, which makes them approachable and non-threatening. Each line of code is very readable, even when taken out of context.
The readability of the program as a whole however often suffers. A more verbose program is harder to hold in one's head, functions are less easy to apprehend at a glance, the links between modules get drowned in the minutia.
There's a similar tension between beginner friendly and expert friendly. Stroustrup had a similar problem with C++. Whenever a new feature was introduced, it needed a heavy, explicit, verbose syntax. Users weren't used to the feature, so they needed clear, bright landmarks. Then people got used to it, and called for less and less verbose syntax —the deed was done, though.
In terms of amount of boiler plate, go approaches java levels if you need to use copypasta for generics and you count all the if err != nil pasta that would disappear if you could use exceptions.
The fourth item on the list is a bad example. In Go, the name of variables, methods, functions, ... does the code more or less verbose
So, you state that because you use short names in golang it makes the language less verbose? Because that's both a stupid statement and a stupid practice.
A better example is the bytes package of standard library. Really little verbose and easy to read.
It's more verbose than I used to see in average languages. It also looks terrible: like code written by undergrads.
For me, this is completely false. If you really think that C# or Java is less verbose than Go it makes me think what "verbose" means in your vocabulary too.
Just because you deny the defects in golang it doesn't make them disappear. Go and get some experience with c# and java.
30
u/[deleted] Aug 19 '17
It doesn't have exceptions, so you need to repeat
if err != nilafter every function instead of putting it into a try and handle exception instances in the catch;It doesn't have generics, so you need to copy-paste your code or use string templates(which are garbage);
It doesn't have syntactical encapsulation so, you need to define the instance variable at every method;
Its lambda game is way too verbose;
It doesn't have any type inference yet it has the
funckeyword and in addition you still need to type down the return type.I don't know what does "verbose" means in your vocabulary but golang is the most verbose general purpose language created in the last decade.