[OT] MultiByteFileStream (was: Re: [Vm-dev] VM Maker:
CMakeVMMaker-StasenkoIgor.104.mcz)
Levente Uzonyi
leves at elte.hu
Tue May 17 15:58:35 UTC 2011
On Tue, 17 May 2011, Igor Stasenko wrote:
>
> On 17 May 2011 16:14, Levente Uzonyi <leves at elte.hu> wrote:
snip
>>
>> Exactly. What I also have in my mind is to remove the #isBinary checks from
>> the TextConverters and put them back to MultiByteFileStream, where they
>> belong to IMHO.
>>
>
> IMO stream wrappers is a way to go. because implementation is much
> more cleaner and concise,
> and you don't have protocol duplication and double-dispatch like
>
> nextPut: -> nextPut: toStream: -> basicNextPut:
>
>
> but that means even more work to whoever would like to do that, up to
That's my longer term plan: replace MultiByteFileStream and
MultiByteBinaryOrTextStream with MultiByteStream, which could wrap a
stream and a text converter.
> the point, that i think it would be easier to drop everything
> altogether and
> start using XTreams (with some compatibility extras to support
> existing protocols) but quickly migrate code to new ones.
But someone has to implement a compatibility wrapper first, which won't
be easy.
snip
>> It's not a false statement, print it: CrLfFileStream new. In Squeak
>> CrLfFileStream is deprecated and if I'm not mistaken the same is true in
>> Pharo.
>>
>
> The problem is that you cannot safely remove it because external
> projects referencing it.
> You saying that it was deprecated years ago. So, why it not removed
> already, so people won't get stuck with it again and again,
> but instead fix references to it and use FileStream instead.
AFAIK VMMaker already requires a compatibility package in Pharo 1.3. Add
CrLfFileStream to that package and the problem is solved.
>>>> I'll upload my fix to Squeak Trunk this week. Applying the changes to
>>>> Pharo
>>>> probably won't work out of the box, because IIRC some issues were solved
>>>> differently in the past.
>>>>
>>>
>>> i'm not sure.
I uploaded my code to the Squeak Inbox, so you can check it out. It
doesn't cover everything, but it's a good start.
Levente
More information about the Vm-dev
mailing list