FAQ

On Wednesday, July 2, 2014 10:05:34 AM UTC-5, Rob Pike wrote:
The generators are computer programs. They are capable of anything
computer programs can do.

The point of this proposal is to encourage experimentation. Experiment!
I have been experimenting with a code generator that would work well with
this idea for about a year.
One of the (minor, ignorable) problems I found was the output began to be
very large (1.3MB .s file for instance).
Everytime I made a change to the generator then checked the code into a git
repo the diff's were huge.

Have you guys thought about doing something similar to this that would run
during go test/build/run?
You could create temp files then, similar to what cgo does.
If that was the case people could leave the generated code out of the
repo's decreasing repo churn.
There would also not be giant semi-unreadable bits of code laying around in
some of my repos ;)
There are downsides to doing it both ways of course, and it is working for
me without official help.

Just a thought.

-rob

On Wed, Jul 2, 2014 at 2:21 AM, roger peppe <rogp...@gmail.com
<javascript:>> wrote:
I like the proposal.

One possibility that occurs to me is that people
might want to write a generator that generates whole
packages, rather than just go files within a package.

This could be particularly useful in the light of
the internal packages proposal. It also allows
programs to keep generated code strictly separate
from user-written code.

Has this been considered? It could be restricted to
creation of packages below the current package
directory.

--
You received this message because you are subscribed to the Google
Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to golang-dev+...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

People

Translate

site design / logo © 2021 Grokbase