Gavin King

Results 1242 comments of Gavin King

> buffers sound good Right, but no way are we adding a buffer-like construct to the language module! Though I suppose we might be able to use `Array` like a...

Perhaps the signature of `encode()` could be something like: ```ceylon Integer encode(List string, Integer index, Array outputBytes, String encoding) ``` where the return value is the number of characters written...

> I would like something like `ByteArrayBuilder` to be provided instead, which grows as necessary :) I'm pretty sure the real usecases don't call for that. We're trying to avoid...

But I dunno, all this is getting a bit messy now. If we can't come up with something sufficiently "clean" here, then it doesn't belong in the language module.

Oh! I just realized that, despite what I had thought, `ceylon.buffer` *is* cross-platform. Duh!

Well, given that, does anybody think there's a usecase for what I've already implemented? i.e. Being able to convert a short `String`s to an `Array` and back without any support...

@FroMage I need to know what you think of this.

Well, wait, perhaps the thing here is that I'm trying to work with whole `String`s rather than just with `Character`s. What if I added `bytes()` and `forBytes()` to `Character`?

I like the following API, with `static` methods on `Character`, probably: ```ceylon class Character { shared static Integer encode(Character character, Array array, Integer index, String encoding) shared static Character decode(Array...

@jvasileff > `Character` is too fine grained for performance Well I think with the API I just proposed, performance is going to be just fine: ```ceylon String string = ......