Blogger

Delete comment from: Stephen Colebourne's blog

Roland Tepp said...

Hello,

I've been thinking about this kind of "Multilingual Java" feature every now and then.

There are generally 2 use cases where I have missed the mixed language support:
* Various string format expressions, regular expressions and the like, where having a compile time syntax check and validation (not to mention IDE editor support with autocompletion and syntax highlight) would greatly enhance my productivity.
* narrowly specialized (mostly declarative) DSL's for laying out GUI widgets, performing SQL queries, etc.

The first case would only require little syntactic sugar, that could easily be provided by annotating variables or properties accepting special syntax strings. Something like that:


>public static Pattern compile(
> @Language(RegexPatternLanguage.class)
> String regex) {
> return new Pattern(regex, 0);
>}

May 5, 2008, 6:30:53 AM


Posted to Enhancing Java - Multi-lingual blocks

Google apps
Main menu