News for hackers. Stuff that matters.
Re:Golang 1.4 Internal Packages by coldtea on Wednesday June 25, 2014 @09:01AM (#7943602)
>There is unexported code duplicated in the standard library because sharing it would have required exporting those functions: net/http and net/http/httputil share a few parsing functions, and there are four ‘func itoa’ in various packages. Similarly, cmd/nm and cmd/objdump contain the same file reading code.

This is so basic and has been solved by other languages so long ago that it's quite strange to see Go had to reach 1.4, and 5+ years of age to get this...

...and in quite an ad-hoc and hackish way -- which means you're tied to a directory hierarchy.

Re:Golang 1.4 Internal Packages by georgemcbay on Wednesday June 25, 2014 @02:13PM (#7945747)
You say ad-hoc and hackish, I say simple and practical.
Re:Golang 1.4 Internal Packages by coldtea on Wednesday June 25, 2014 @10:35PM (#7947870)
Simple is not always good.

As the quote (attributed to Einstein IIRC) goes: "You must strive to make things as simple as possible -- but no simpler than that".

This is, I think, something "simpler" than simple ("simpleton"?).

Re:Golang 1.4 Internal Packages by BarkMore on Wednesday June 25, 2014 @09:24PM (#7947680)
Which languages have solved this problem?
Re:Golang 1.4 Internal Packages by coldtea on Wednesday June 25, 2014 @10:36PM (#7947877)
All languages that don't tie visibility rules to the name of the variable/function? Even C++ applies IIRC.
Re:Golang 1.4 Internal Packages by BarkMore on Saturday July 05, 2014 @12:17PM (#7992259)
The mechanism for specifying visibility has nothing to do with the issue.

The Java approach for standard packages is nearly identical to what's proposed for Go. Anything in the com.sun. (or whatever they call it now) namespace is considered internal, even though it's publically accessible.