Hi Benjamin,

thanks for reaching out to us. Answers are inline.

On Sat, Feb 7, 2015 at 5:31 AM, Benjamin DeLillo <bpd9...@gmail.com> wrote:

> For an implementation to be accepted would it have to conform to the entire 
> Java Formater spec? 
> http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html
>
> I think supporting the entire java spec is impossible since we do not have
Locale working (for codesize reasons). So we would need to discuss what a
good subset would be


>
> Would an implementation lacking the Date/Time conversions be acceptable?
>
> Would an implementation that wraps sprintf.js be acceptable (if the licensing 
> is compatible)? https://github.com/alexei/sprintf.js
>
> I briefly skimmed the lib and it seems huge, so I am inclined to say no.
In general you have to think about that any application will have the hit
of that method in their app as soon as they call String.format one time in
their code base.


>
> What about a minimal positional substitution implementation and nothing more?
>
>
Right now any code that relies on String.format will not compile in GWT and
thus give the author a clear indication of having a problem. Once we
support a subset this compile error might be gone, but we will be
introducing runtime errors for not supported features rather than compile
time errors.

One could try to deal with these (and this is bad from the compiler
perspective), by looking at the parameters of String.format and only allow
statically resolvable arguments for the format String that are supported by
the emulation, but this is a very tight coupling of compiler and lib that
we do not want in the compiler.

So if we want to do a minimal support of String.format these are the kinds
of problems we need to discuss.



>  --
> 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 google-web-toolkit-contributors+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-web-toolkit-contributors/bc6afdc0-eb87-4815-b076-6db912f8f94c%40googlegroups.com
> <https://groups.google.com/d/msgid/google-web-toolkit-contributors/bc6afdc0-eb87-4815-b076-6db912f8f94c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Google Germany GmbH
*Dienerstr. 12*
*80331 München*

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Katherine Stephens

-- 
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 google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CALLujir_g5%2BZhbDbF_CnbHdKyfKAYomz9%2B9x3asZvu0O7vGQKg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to