Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

slightly unrelated but what’s with storing the entire codebase in the root directory instead of a nested src folder? It makes getting to the README a lot more difficult


Thats the default for go projects. Go imports are repository strings (e.g.):

     import ("github.com/go-sql-driver/mysql")
so it's standard to have the library files in the root directory.


FWIW I usually don't structure my Go projects this way unless they're very very small. This is what I usually do for anything larger than 2-3 files:

  ├── cmd
  │   └── binary-name
  │       └── main.go (may subpackage for things like CLI porcelain, etc)
  ├── go.mod
  └── internal
      └── app.go (and subpackages, etc)


I assume this is why GitHub has the annoying #readme-ov-file slug


This is valid criticism. Go fanbois don't like listening to any go criticism. They were all like who needs templates in go. and now go has templates.

To me go code looks like somebody vomitted stuff in the root dir and i have to wade through that every time. No namespacing. nothing


I don't like go as a personal preference but reducing them to "fanboys" is a bit reductive. I'm sure the same could be said about your own favorite language.


Also as far as being civil: please watch literally any Rob Pike vibe chastizing Python and Java communities to no end. It is that rhetoric. That is why Go has fanbois. They can only see what the Gopher says and what Rob Pike says. Nothing else.

Other languages have fanbois but they didn't disparage and denigrate other communities to prove themselves.


Is it reductive when its describing a group of people that like something and refusing to hear any ill of it? The comment wasn't shade at people using the language in general.

And you're right, fanboys are in every language. But resorting to changing the argument by whataboutism is a bit reductive.


I’m not a go fanboy, but I do know from other contexts that so-called “fanboy“ behaviour is frequently associated with level-headed supporters getting defensive in the face of imprecise criticism.

There’s an oft-repeated pattern where valid specific criticisms morph into broad criticism, which morphs into judgement, which breeds defensiveness, which feeds the criticism. Once you recognise this pattern, you see it everywhere.


Sure, and there's the near-identical pattern where valid specific criticisms are taken as broad criticism even though they aren't, etc., etc..


Thats the defensive step outlined above.


Ok... The question was why is it like that. The answer is because it's in go. Nobody was anything other than civil before you neckbearded in here. Chill. There's a sane way to say what you said.


I wish I could grow a beard. Also as far as being civil: please watch literally any Rob Pike vibe chastizing Python and Java communities to no end. It is that rhetoric. That is why Go has fanbois. They can only see what the Gopher says and what Rob Pike says. Nothing else.


I believe it was "They were all like who needs generics in go. and now go has go generate and templates."

I guess I qualify as a Go fanboi -- it is not perfect but gets the job done for a lot of us, sorry it doesn't work for you.

But back to your point about "vomit in the root dir", Go does have namespacing of sorts via packages, and the pattern you criticized is not the only way -- often just a simple main.go at the root bringing in packaged functionality.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: