I'm disappointed that after starting from scratch they created a "modern" language that requires a module import just to print (and corresponding extra syntax for that namespace when making the call).
How could this not have seemed incredibly clunky after using it for just a little while? It's the same frustration one feels when simple print-outs fail in C++ because you forgot to "#include <iostream>". Sometimes you just want to print stuff no matter what file you're in. Languages should make it almost impossible to fail at extremely common tasks. It's these little things that make Python and Perl enjoyable to program in, and these little things that every new language should begin with!
One of the design goals of Go is that the language is small. There's nothing so special about string formatting that it should be part of the language proper, and it would add a lot of complexity to the spec if it were.
With that said, there are built-in print and println functions that write to stderr, which are useful for debugging. That would seem to address your complaint. The fmt package is a lot more fully-featured than the built-ins though.
Thanks for pointing it out. I wish they used that in their "hello, world" example because 'println("hello, world")' leaves a much better first impression of simplicity.
I generally like to see things kept simple. But formatting is a common need and they've actually made things less simple by providing both fmt.Println() and println(). It means the same program will inevitably contain both, depending on who did the editing. There are times when a feature is so basic that it really should have exactly one way to do it, and I think printing is in that category.
Your position is not very pragmatic, and taking such a hard line is rarely productive.
The fmt package does a lot of stuff. Check out the link I provided above. To put all that stuff into the language spec - and then foist responsibility of writing and maintaining that code onto every implementation of the language - would be crazy. So it seems a good idea that the fmt package should exist and that it should be written in Go.
On the other hand, it's nice to be able to print when working on low-level libraries where fmt is not available (syscall, os, etc). The print and println functions service this need, and that's really all they're used for apart from temporary debugging prints.
It would be a mistake to use the built-in println in the hello world example because it would demonstrate precisely the wrong use of the built-in functions. Hello world should print to standard output and it should use the standard means of formatting strings. In Go, that is fmt.
There are a few of such compromises in Go (not many, though). Sometimes you need to put your ideals to the side in the name of simplicity and pragmatism.
How could this not have seemed incredibly clunky after using it for just a little while? It's the same frustration one feels when simple print-outs fail in C++ because you forgot to "#include <iostream>". Sometimes you just want to print stuff no matter what file you're in. Languages should make it almost impossible to fail at extremely common tasks. It's these little things that make Python and Perl enjoyable to program in, and these little things that every new language should begin with!