On Wed, Feb 13, 2013 at 4:54 AM, <itmi...@gmail.com> wrote:The examples in the spec are not complete programs, and making them
>
> There are a number of examples in the spec.
> For the local version of the spec, it makes sense to have the examples
> "hardcoded" in the page.
> For the online version, using golang playground for examples, would that
> potentially be a future problem, for the spec or for any kind of docs,
> articles etcetera?
into complete programs would add unnecessary padding. So I'm not sure
it's a good idea there.
For other docs, like Effective Go, it could be done. If you look at
the Effective Go source, you will see that it uses {{code}} links to
bring in programs. We could perhaps modify godoc to link to the
playground for those if think it would be useful.
Ian
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
On Wed, Feb 13, 2013 at 6:46 AM, Ian Lance Taylor <ia...@google.com> wrote:On Wed, Feb 13, 2013 at 4:54 AM, <itmi...@gmail.com> wrote:The examples in the spec are not complete programs, and making them
>
> There are a number of examples in the spec.
> For the local version of the spec, it makes sense to have the examples
> "hardcoded" in the page.
> For the online version, using golang playground for examples, would that
> potentially be a future problem, for the spec or for any kind of docs,
> articles etcetera?
into complete programs would add unnecessary padding. So I'm not sure
it's a good idea there.Once I understood how it worked, I came to like the way that `present` handles only showing the relevant code while still having the whole source available to the playground. It's probably a lot of effort for the spec, but a similar technique could be used.
It only exists in my head :-)
--
Other languages is a really good point. Is there infrastructure for translating golang.org and the docs etc into other languages? I'm sure you'd have lots of people willing to help (unfortunately I'm useless in anything but English).