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

> I don't like using exported variables as final values, so I need to use functions to return the final values, which is verbose and not elegant. Lacking of read-only values also causes some unnecessary performance losses.

This sounds like you're fighting against the language. I think a lot of developers do this. I think one should either embrace the language or find another (you did mention moving to C++).



I do this to adapt it, to make code more secure and serious. I embrace other features in Go but not this one. This one makes Go some like a non-serious language.


In what way does it make Go "non-serious"? And, why do you care? I care about the suitability of a language for the problem I'm trying to solve, not it's "seriousness". What concrete difference does this make to programs that you're writing?


Variables means modifiable. Using variables as final values is bad. This is so simple that no explanations are needed.




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

Search: