On Thu, Jul 30, 2020 at 12:54 PM Volker Dobler <dr.volker.dob...@gmail.com> wrote:
> You dop not import files and you do > not run files and you do not test files. Files contain the > sources but are basically uninteresting: Focus on > packages (and modules). > In Go, we disconnect the name of a file and the package in which it lives. That is, the programmer is free (mostly) to choose whatever names for files in a package, and also free to create as many files as is seen necessary. It is in contrast to a large set of other languages, which require that the package and the filename stay the same. The advantage is that you can have very large packages and gracefully split them over multiple files without having to resort to inventing new internal package names. My general view is that you shouldn't assume a connection between the file system and the packages of your language, and the languages which do have the wrong design. However, since that "mistake" is made in many languages, people tend to get somewhat confused when they encounter a system where it isn't the case. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAGrdgiX%2BN%2BospARM7adQ1E0wk-K7M73Jbj1KEUXkxjGGq9Q9zg%40mail.gmail.com.