This is only true if that new one is closely related to the ones you already know.
Learning, say, Haskell, in the period of week for the person with knowledge of “standard set” like C,Python,JS,Go will be somewhat painful exercise include some brain explosions.
It's a special case IMO.
Go: no headers. C: headers.
Go: no pointer math. C: pointer math.
Go: multiple return values. C: one return value.
Go: no parens for if/for. C: parens for if/for.
Go: interfaces. C: no interfaces.
etc.
- syntax (curly braces, star for pointers and dereferencing, ampersand for getting the address etc., cleaned up for faster parsing and with some genuinely new things)
- iteration via for loops (no iterators, no map/fold/...)
- structs for data abstraction
- layout of variables in structs corresponding directly to memory layout
- argument passing by value or via pointers
- very weak typing
Look at it from the other side, what new things has a C programmer coming to Go learn, besides the syntax? Slices, goroutines, make/new, and some little bits related to packages/runtime, all hardly difficult concepts. Some old habits do not work anymore, mostly minor things. Finally both authors (Thompson and Pike) were C coders for decades...
It is generally stronger than C's, in that C lets you be quite... creative... in how you cast values. Go qua Go does not let you do that, though it does have an escape hatch via the unsafe package that lets you do anything C can, mostly used for interfacing with C.
type foo int
var (
A foo = iota
B
C
D
)
func bar(x foo) ...
It's an error to write: bar(2)
That's enough typing to prevent many types of annoying mistakes.If the if/for constructs are sufficiently alike that you can meaningfully compare their parentheses usage, then I think that's evidence they're pretty damn similar.
Also, the cost and gain of various features (for example headers) was completely different then.
What is harder and crucial for productivity is remembering a wide subset of the standard (at least) library, and this is much harder. I wrote non-trivial software in C, C++, Java, Python, Ruby and Lisp/Scheme, but I only really know by heart the standard library in Ruby, because I do it for a living currently, and a fair bit of the Java one, in other languages I have to look up things all the time.