FAQ
"Copy-and-paste programming" is generally considered a bad thing, so you
should probably try to change the way you write code.

That said: while I don't think every single documented function needs a
20-lines
compilable code snippet, I agree that the lack of complete, comprehensive
examples
in the go documentation can create difficulties to novice go programmers.
Some
packages have a few examples at the top of the page, but more are needed.

There was a discussion about this in the past
https://groups.google.com/d/msg/golang-nuts/eV3uNlEFPrc/Mc43SvhMSboJ


Il giorno sabato 26 dicembre 2015 21:34:07 UTC+1, amigode...@gmail.com ha
scritto:
I'm wondering if I'm the only one with an issue like that. You see, I
can't program anything if I don't have an example. I just can't. The only
way I ever do anything, is by copying a snippet of code, see if it works,
maybe edit something, copy another snippet, see if everything still works,
comment uncomment things, etc. I rarely ever type something myself, except
if it's a google's search query. And I never memorise function's names,
because I usually only need to find them once, make them compile and work
once, and then I'll just copypaste it around. Even then I'm reading
tutorials, I often just skim over the text and look right at the code.

Maybe this is normal, but this becomes an issue with go. I just can't find
enough examples to copypaste from. The references are completely useless
for me, because they have almost no examples, and they are placed in the
alphabetical order, not in the order users should learn new functionality,
from simple to complex and from common to rare. I just can't use them. And
most libraries only use this format as the only source of documentation,
this just isn't enough for me.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedDec 26, '15 at 8:34p
activeDec 28, '15 at 12:53p
posts2
users2
websitegolang.org

2 users in discussion

Alb Donizetti: 1 post Amigodefile2221: 1 post

People

Translate

site design / logo © 2021 Grokbase