News for hackers. Stuff that matters.
Re:Golang 1.4 Internal Packages by frou_dh on Wednesday June 25, 2014 @05:11AM (#7942908)
Magic directory names seems a bit of a hack to avoid supporting this notion in the language itself.

AFAIK this also introduces the English language into the currently freeform world of user import paths. I guess source files themselves already have something similar with the "_test.go" suffix, so there's some consistency with that.

Re:Golang 1.4 Internal Packages by sambeau on Wednesday June 25, 2014 @05:57AM (#7943013)
Plus, every keyword is already in English.
Re:Golang 1.4 Internal Packages by frou_dh on Wednesday June 25, 2014 @06:02AM (#7943032)
That goes without saying at this point. I'm not saying the English-in-path thing is a huge deal, but it's worth noting effects that sneak in along with a feature.
Re:Golang 1.4 Internal Packages by bwooce on Wednesday June 25, 2014 @06:12AM (#7943057)
What magic directory names? The special case for "pkg" is the only one I saw.

The main proposal is one of scoping by directory hierarchy - /a/b/c can import a/b/d but a/g/x can't.

Re:Golang 1.4 Internal Packages by frou_dh on Wednesday June 25, 2014 @06:25AM (#7943092)
> /a/b/c can import a/b/d but a/g/x can't.

No - x can import d because d isn't in a directory literally named internal. That's the magic name.

Re:Golang 1.4 Internal Packages by lloeki on Wednesday June 25, 2014 @06:32AM (#7943119)
> What magic directory names?

"internal"

> The main proposal is one of scoping by directory hierarchy - /a/b/c can import a/b/d but a/g/x can't.

/a/b/c can import a/b/d, and /a/g/x and /z can too. The new rule is that /a/g/x can not import /a/internal/y.

Re:Golang 1.4 Internal Packages by sltkr on Wednesday June 25, 2014 @06:44AM (#7943159)
> The new rule is that /a/g/x can not import /a/internal/y.

As I understand it, /a/g/x CAN import /a/internal/y, because /a/g/x is in the directory tree that starts at /a/. However, /b/h/z CANNOT import /a/internal/y/ (while previously, it could).