Re: [DISCUSSION] Views of immutable objects.

2007-07-31 Thread Paulo Levi
Err. That is solves MY specific problem with char[]'s. If only impedance mismatch wasn't such a problem with abstractions. I still think it would be a good idea to get a read-only view of primitives, if it could be implemented efficiently and transparently.

Re: [DISCUSSION] Views of immutable objects.

2007-07-31 Thread Paulo Levi
You're right, that method does what i suggested. Unfortunately it doesn't seem to help as i thought it would. I wanted to both eliminate the allocation and any copying done before inserting the String on the Document. I can eliminate the allocation keeping a buffer for a String bellow a certain siz