3 ms·
There are many good things in go, but some very weird stuff too. Good things are multiple return values, lack of semicolon, optional braces for if and for, ins
by jokoon 11y ago
There are many good things in go, but some very weird stuff too.
Good things are multiple return values, lack of semicolon, optional braces for if and for, insanely fast compile time.
Bad things are forced curly brace style, complicated function declaration syntax, variable declaration which is too different from C in my opinion (type after the variable name).
I'd honestly prefer a language which is even closer to C or C++ in its syntax, with native maps, sets, queues, tuples, etc (pythonic stuff) without necessarily having templates or inheritance. I put a lot of value in syntactic sugar over overblown abstract stuff. Using plain struct with data oriented programming will be more than enough in most of the cases.
We are still waiting for C++ modules, which obviously might be lagging because C++ has an ISO standard and a lot of existing code which involves backward compatibility, but I think we need a new language that could be faster to compile, just like go is.
- hibikir 11y agoTypes after variable names are here to stay though: they are in no way something new, and make a hundred times more sense when there is type inference: If writing down the type is optional, then it should go last. Given that some level of type inference seems to be the future of strongly typed languages, I expect variable ahead of type to become more and more popular among language designers.