Yes, they both work - and the "#^chars" is much more legible.
Many thanks!
FYI, to whom it may concern...I think it's worth noting that this
simple
case gives confusing output from the repl.
user=> (new String #^chars (make-array Character/TYPE 3))
"user=>
And this:
user=> (def
Also you can substitute #^"[C" with the more legible #^chars.
On Oct 28, 7:27 pm, Alex Osborne wrote:
> Chick Corea wrote:
> > What is wrong with this code? I want to instantiate a Java String
> > from a Java character-array.
> > But I want it to be fast, hence the need to cast per the "warn o
Chick Corea wrote:
> What is wrong with this code? I want to instantiate a Java String
> from a Java character-array.
> But I want it to be fast, hence the need to cast per the "warn on
> reflection" message.
>
> user=> (set! *warn-on-reflection* true)
> true
> user=> (new String #^