cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobia Conforto <>
Subject Re: Java strings vs. Javascript strings
Date Tue, 28 Aug 2007 14:25:25 GMT
Jason Johnston wrote:
> So digging around in the Rhino API I discovered the WrapFactory
> class[1], which is what Rhino uses to wrap Java objects returned from
> methods so that they can be scripted.  By default it wraps
> java.lang.String objects just like it wraps any other Java object,
> giving your script access to its Java methods.  But it does allow you
> to switch this behavior for "primitive" values (strings, numbers,
> booleans), so that it exposes them as native JavaScript primitives

Thank you!  This is going to be a noticeable time saver for us, by
eliminating lots of small errors.

IMHO dynamic languages such as JavaScript are less expensive to program
in than statically typed ones like Java, at least for small- to
medium-sized projects.  But only if Things Just Work™, and having to
deal with only one class of primitive types is part of it.

I'd like to suggest making it the default in Cocoon.
Should I post an issue to JIRA or a message to the dev mailing list?


> [1]

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message