|
|
|
|
|
by stcredzero
3596 days ago
|
|
Hell, simply the idea of programming is rife with potential for abuse. Exactly. Everything you add has a cost/benefit for a particular context. Evidently you disagree with how the Golang team has calculated cost/benefit with regards to generics. Because from my perspective, being able to define parametric data types and functions is a huge win for safety and terseness of code without a lot of downside. Terseness is a good thing? Some people say terseness is bad. Is safety the only issue or always the top priority? All production code exists in a specific context. It's best to tailor to your specific context. This may well mean that you may encounter a context where you do not want to use Go. http://anomaly.org/wade/blog/2013/07/coding_style_terse_vs_v... |
|
Clarity is good. Clarity comes from both including every relevant detail (which pulls away from terseness) and excluding irrelevant details (which pushes towards terseness). Clarity also comes from saying everything that has to be said exactly once and no more than that (which pushes towards terseness).
Unfortunately, when you program in Go, you often have to pay attention to irrelevant details, and you have to say what you want more than once.
> Is safety the only issue or always the top priority?
The benefits of typeful programming go beyond type safety. They also include: “economy of thought”, “fearless refactoring”, “less time wasted on fixing stupid mistakes”, etc.