News for hackers. Stuff that matters.
Re:Why I Don't Like Golang (2016) by DaveInTucson on Wednesday June 12, 2019 @09:15PM (#20171029)
I thought one of the basic lessons we learned from the last 70 years of programming language design is that it's a bad idea to make semantics depend on lexical structure.

I'm really surprised people like Rob Pike and Ken Thompson would design a language where the visibility of an identifier depends on the case of its identifier.

Re:Why I Don't Like Golang (2016) by lacker on Thursday June 13, 2019 @01:12AM (#20171979)
If you work for a while at a larger company that enforces a style guide, it starts to make total sense. If your company's style guide already insists that identifiers should be named with some convention that matches their visibility, then by making that part of the language, you are simplifying the system.

I would not be surprised if specifically the Google C++ style guide influenced this decision.

Re:Why I Don't Like Golang (2016) by saagarjha on Thursday June 13, 2019 @01:39AM (#20172095)
Yes, but this forgets the fact that companies have different style guides.
Re:Why I Don't Like Golang (2016) by ecnahc515 on Thursday June 13, 2019 @01:54AM (#20172163)
That doesn’t exist for Go because of gofmt.
Re:Why I Don't Like Golang (2016) by saagarjha on Thursday June 13, 2019 @02:00AM (#20172191)
I don't think gofmt changes identifiers?
Re:Why I Don't Like Golang (2016) by sim_card_map on Wednesday June 12, 2019 @09:27PM (#20171088)
Interesting. Do you have links? Or maybe a short summary why this is bad?
Re:Why I Don't Like Golang (2016) by apta on Wednesday June 12, 2019 @10:21PM (#20171330)
It becomes very annoying and tedious to refactor when you need to change visibility. Suddenly, a single line change (e.g. changing private to public) needs an IDE to refactor it and make sure it gets all instances (which is quite ironic given that golang proponents generally shun IDEs). Now depending on how many instances changed, you would need to split up your diff for readability, or clutter your diff with needless changes.
Re:Why I Don't Like Golang (2016) by zemo on Wednesday June 12, 2019 @11:35PM (#20171604)
> a single line change (e.g. changing private to public) needs an IDE to refactor it

the language comes with a rewriting tool that rewrites arbitrary expressions.

gofmt -w -r 'thing -> Thing' *.go

Re:Why I Don't Like Golang (2016) by apta on Wednesday June 12, 2019 @11:45PM (#20171640)
Still more and unnecessary effort compared to changing one word.
Re:Why I Don't Like Golang (2016) by DaveInTucson on Friday June 14, 2019 @01:45AM (#20180807)
The linked article discusses this in the first point:

* Changing the visibility of a variable requires changing its name, everywhere it's used.

* It also cuts contrary to some very long-standing traditions, like using all caps for global constant names, using title case for class names, and starting with lower case for most everything else.