On Fri, Feb 28, 2014 at 5:52 AM, Andrés Testi <[email protected]>wrote:
> Please, don't adopt Lombok. While it is an interesting project, it is > still a hack. We should wait for java8 compiler plugins, because they are > an official feature and have a lot more probabilities than lombok to be > forward compatible and standardized. Ironically, Reinier Zwitserloot, one > of the authors of Lombok, disagreed with me when I proposed Annotation > Proccessors as replacement for generators, 7 years ago: > https://groups.google.com/d/msg/google-web-toolkit-contributors/2uBiRzMJLgM/v0tX_DXEv6oJ > > My original intention with this post, was to deprecate a redundant feature > like SourceWriter. While the suggested way to go would be APT (I'm not > really convinced about it), GWT.create() will stay here for years. I can't > see incompatibility between adoption of APT and deprecation of > SourceWriter. Promoting the use of tools like JavaWriter instead of > GWT-only features, is a good sign for developers to go for other options. > Less code to mantain is better. > Deprecating SourceWriter and replacing it with JavaWriter means encouraging our users (and our own code-base) to move out of SourceWriter to JavaWriter. If we decide APT is the way to go then if someone is going to write generator, it should be APT - in that case internally we may use JavaWriter and externally they could use whatever they want (including the JavaWriter). However, If the generator is already written, then it is a meaningless effort to move out of SourceWriter. All of these together there is very little value compared to the cost of such move (including the annoyance caused by it). > A quick example: > Generator.escape() doesn't escapes UTF-8 control characters. To fix it, I > must write a patch, pray for its approbation, and wait for the next GWT > release. Or I can just use JavaWriter.stringLiteral() . > > - Andrés Testi > > El jueves, 27 de febrero de 2014 22:02:14 UTC-3, Ray Cromwell escribió: >> >> I think if we move to APT, you can do AST based code-gen via something >> like a JavaWriter to a stream, or if we adopt lombok, then you construct >> code by directly manipulating the trees of JavaC and JDT. >> >> >> >> >> On Thu Feb 27 2014 at 4:17:15 PM, James Nelson <[email protected]> >> wrote: >> >>> Is there anywhere to get a sneak preview on the discussions about the >>> future of codegen? >>> >>> Andres and I have both invested time in some extensions of ast-based >>> codegen, and could really use some time and forewarning to adapt our >>> strategy to stay future-friendly with out apis. >>> >>> -- >>> http://groups.google.com/group/Google-Web-Toolkit-Contributors >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "GWT Contributors" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] >>> . >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > --- > You received this message because you are subscribed to the Google Groups > "GWT Contributors" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors --- You received this message because you are subscribed to the Google Groups "GWT Contributors" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
