String literals in Java 7: version 1.2

Howard Lovatt howard.lovatt at iee.org
Sat Mar 14 19:19:26 PDT 2009


The things I miss in Java strings are:

1. Embedding expressions, e.g. in JavaFX you can write "The answer is
{answer ? "Yes" : "No"}". In the example the part inside the {} is
evaluated and replaced by its value, if that value isn't a string then
it is converted to a string automatically.

2. Easy internationalisation, e.g. in JavaFX you can write
##"Favourites" and the compiler internationalises your code and
creates a properties file which you then edit for the different
locales ("Favourites" = "Favorites")

I am not saying that your other extensions to Java Strings are not
good suggestions, just that I miss these more. It would also be nice
to be similar to JavaFX, since the two are likely to be used together.



More information about the coin-dev mailing list