Haha :D

On Wed, Oct 13, 2010 at 7:38 PM, Jörg Schaible <[email protected]> wrote:
> Hi Kenneth,
>
> now, after your mail, I realize that Java is also a swamp, too:
>
> ===== %< =====
> import javax.script.ScriptEngine;
> import javax.script.ScriptEngineManager;
> import javax.script.ScriptException;
>
> public class HelloWorld {
>  public void main(String[] args) {
>    ScriptEngineManager manager = new ScriptEngineManager();
>    ScriptEngine engine = manager.getEngineByName("JavaScript");
>    engine.put("world", "world");
>    String result;
>    try {
>      result = (String)engine.eval("'Hello ' + world + '!'");
>    } catch (ScriptException e) {
>      return;
>    }
>    System.out.println(result);
>  }
> }
> ===== %< =====
>
> Take a look at the most obvious problems in the above:
>
> ===== %< =====
>    ScriptEngineManager manager = new ScriptEngineManager();
>    ScriptEngine engine = manager.getEngineByName("JavaScript");
>    engine.put("world", "world");
>    String result;
>    try {
>      result = (String)engine.eval("'Hello ' + world + '!'");
>    } catch (ScriptException e) {
>      return;
>    }
> ===== %< =====
>
> I am very new to Java, but it strikes me that what the above is saying is
> (in shell script):
>
> echo "Hello world!"
>
> I am just so sick of using crappy "solutions" (read: Java) layered over top
> of what could be good solutions.
>
> Sorry, I had to vent.
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to