As an alternative to what Goktug proposed about macros, we would have an
equivalent to Scala macros (sorry for insisting with Scala :-) )
@Macro(SumGenerator.class)
Integer sum(Integer arg0, Integer arg1) {
// We will never be here
return null;
}
// rebind space
class
My original motivation was like the String.format() case, but with
GwtQuery's $() function, since GwtQuery supported compile-time CSS selector
parsing, is was really tedious to add them to an interface when all you
wanted was $(.foo h1.title) or some such. Later, when doing GWT
Exporter I noticed
On Sun, Aug 11, 2013 at 10:16 PM, John A. Tamplin j...@jaet.org wrote:
On Mon, Aug 12, 2013 at 1:13 AM, Goktug Gokdogan gok...@google.comwrote:
Even though the current form is pretty flexible and you can mix and match
the two, it doesn't mean it makes sense to do so. I'm having hard time
On Mon, Aug 12, 2013 at 2:29 AM, Goktug Gokdogan gok...@google.com wrote:
An example use-case would be implementing String.format when the format
string is a compile-time constant. I had a proof of concept mostly working
for this, but it was going to require more surgery to the compiler than
John, I put together a quick proposal for evaluate-with as a comment to
the document. Please take a look.
On Sun, Aug 11, 2013 at 11:42 PM, John A. Tamplin j...@jaet.org wrote:
On Mon, Aug 12, 2013 at 2:29 AM, Goktug Gokdogan gok...@google.comwrote:
An example use-case would be implementing
Even though the current form is pretty flexible and you can mix and match
the two, it doesn't mean it makes sense to do so. I'm having hard time
thinking about out a good use case that would make a single complex mix and
match more appealing than having a separate group of class replacements and
a
On Mon, Aug 12, 2013 at 1:13 AM, Goktug Gokdogan gok...@google.com wrote:
Even though the current form is pretty flexible and you can mix and match
the two, it doesn't mean it makes sense to do so. I'm having hard time
thinking about out a good use case that would make a single complex mix and
APT is missing mostly whole-world kind of informations in TypeOracle (e.g.
getAllSubTypes) but perhaps this is also advantage and that is why it help
the compiler to scale better :) Also looking at the usages
of getAllSubTypes it is not like a major deal if we replace GWT-RPC with
something that
On Sat, Aug 10, 2013 at 10:28 AM, John A. Tamplin j...@jaet.org wrote:
On Fri, Aug 9, 2013 at 7:16 PM, Goktug Gokdogan gok...@google.com wrote:
I think in the long-run we should separate the two concepts that is being
tackled by GWT.create today.
First purpose is the class replacement,
On Sat, Aug 10, 2013 at 11:18 AM, Brian Slesinsky skybr...@google.comwrote:
2. IDE support: IDE can trigger codegen (esp. for debugging)
My experience with this has been pretty poor, and running GWT with -gen
is at least as useful.
Also, Super Dev Mode gives you access to all the
Today, even GWT generator developers are having trouble debugging generated
code with -gen (just think GWTTestCase). It is not very practical for every
day usage of end users.
I don't know how well APT support of IDEs are today but that's something
that IDE's itself can improve upon and we can
There aren't really two concepts: you can mix and match generate-with and
replace-with for the same type, and/or switch from one to the other over time.
Actually, replace-with is only a shorthand for a generator returning a constant
value (of a class that already exists).
--
I don't think APT is good enough. Java8 has a compiler plugin API for
code-gen that might work. APT has limitations that make it problematic to
replace generators. Stephen Haberman brought this up at the GWT meetup.
On Fri, Aug 9, 2013 at 4:16 PM, Goktug Gokdogan gok...@google.com wrote:
I
On Fri, Aug 9, 2013 at 7:16 PM, Goktug Gokdogan gok...@google.com wrote:
I think in the long-run we should separate the two concepts that is being
tackled by GWT.create today.
First purpose is the class replacement, especially used by permutations. I
think this one should not have anything
2. IDE support: IDE can trigger codegen (esp. for debugging)
My experience with this has been pretty poor, and running GWT with -gen is
at least as useful.
Also, Super Dev Mode gives you access to all the generated code. You can
either use the browser's debugger with SourceMaps turned
On Sat, Aug 10, 2013 at 2:18 PM, Brian Slesinsky skybr...@google.comwrote:
2. IDE support: IDE can trigger codegen (esp. for debugging)
My experience with this has been pretty poor, and running GWT with -gen
is at least as useful.
Also, Super Dev Mode gives you access to all the
This reminds me a lot of Scala macros research. As you probably know, Scala
solves code-gen issues with experimental support for several kinds of
macros, distinguishing clearly between expression-level and type-level code
generation/rewriting.
APT covers only a fraction of type-level
I miss this line in my dagger example:
CoffeeApp coffeeApp = objectGraph.get(CoffeeApp.class);
El sábado, 10 de agosto de 2013 16:23:50 UTC-3, Andrés Testi escribió:
This reminds me a lot of Scala macros research. As you probably know,
Scala solves code-gen issues with experimental support
Now that I understand it (hopefully), I think Ray's proposal is a good way
to define new API's by writing Java wrappers that configure generated
objects at runtime. Adding parameters to GWT.create() calls seems somewhat
orthogonal as a way to pass arguments to generators at compile time.
As often
On Sat, Aug 10, 2013 at 4:42 PM, Brian Slesinsky skybr...@google.comwrote:
Now that I understand it (hopefully), I think Ray's proposal is a good way
to define new API's by writing Java wrappers that configure generated
objects at runtime. Adding parameters to GWT.create() calls seems somewhat
Hi, I've published a document [1] with my thoughts on some of the
GWT.create() proposals. This doesn't cover everything we've discussed but I
think it's a start. If you're on this mailing list you should be able to
comment.
- Brian
[1]
I think in the long-run we should separate the two concepts that is being
tackled by GWT.create today.
First purpose is the class replacement, especially used by permutations. I
think this one should not have anything to do with GWT.create. We can do
any class replacement in compiler without
22 matches
Mail list logo