News for hackers. Stuff that matters.
Re:Golang 1.4 Internal Packages by chrismonsanto on Wednesday June 25, 2014 @06:43AM (#7943156)
> Packages and modules should never be reliant under an assumption about the underlying file system, as it tend to lock languages to certain platforms.

And it gives you an escape hatch from Java-style module nonsense: of COURSE I want to traverse 7 singleton directories to get to the source code!

Re:Golang 1.4 Internal Packages by levosmetalo on Wednesday June 25, 2014 @10:33AM (#7944106)
Java allows you to put all your source files in one directory and javac *.java will happily compile them. Package-directory structure applies only for compiled classes and internal content of a jar file. For Java sources, that is just a convention.

But of COURSE, it is so modern to blame Java for everything these days.

Re:Golang 1.4 Internal Packages by MichaelGG on Wednesday June 25, 2014 @08:39PM (#7947554)
I had no idea. Why do so many projects setup these crazy directory trees for source then?
Re:Golang 1.4 Internal Packages by levosmetalo on Monday June 30, 2014 @10:32AM (#7965221)
Because it allows you to have your User.java class in both com.comp.ldap and com.comp.db packages.
Re:Golang 1.4 Internal Packages by taf2 on Wednesday June 25, 2014 @02:31PM (#7945868)
Blaming java is nothing new.
Re:Golang 1.4 Internal Packages by richardwhiuk on Wednesday June 25, 2014 @10:14AM (#7943973)
That would be a simple fix to be honest - and one that Java 8 could make without backward compatibility issues. Simply allow the hierarchy to be short cutted if a directory contains the a dot separated name

e.g instead of com/foobar/bar/module/a/b allow com.foobar.bar.module/a/b

Re:Golang 1.4 Internal Packages by lobster_johnson on Wednesday June 25, 2014 @12:36PM (#7945057)
I believe Java will behave sanely with regard to source directories. If you have a file Foo.java declaring itself as "package x.y.z", then it can happily live as "src/Foo.java".

It's only when you try to run the thing that the JVM will complain (with the rather unhelpful error message "wrong name: x/y/z/Foo"). So if your build process builds the correct folders and stores the .class files there, it's going to work. (Not that it's very useful; after all, your build system would have to know where to put everything.)

Re:Golang 1.4 Internal Packages by rem7 on Wednesday June 25, 2014 @12:58PM (#7945227)
The fact that we are comparing all of this with java makes me so sad.
Re:Golang 1.4 Internal Packages by pjmlp on Wednesday June 25, 2014 @10:15AM (#7943977)
Which happens to be shared by other languages as well.