2015-02-26 22:37 GMT+01:00 stepharo <[email protected]>:

> Why do we have to put everything in string?
>
> why
>     Zip string: 'hello'
>     Zip bzip string: 'hello'
>     Zip gzip string: 'hello'
>
> would not be more modular?
> Zip could be a factory and have subclasses.
>
> This is not because can extend classes that we should think about nicer
> way.
>
> I like for example the DateFormatter strategy related to Date from other
> languages because I can specify the way I want it.
>
> Stef
>
>
Because somehow you can easily pipe unary messages.

     ^'hello' zipped base64Encoded

versus:

    (Encoder base64 byteArray: (Zip gzip string: 'hello')).

I much much prefer to read/maintain 1st version
The 2nd one looks like overkill verbiage to me.



> Le 25/2/15 16:52, Juraj Kubelka a écrit :
>
>  25. 2. 2015 v 12:28, Sven Van Caekenberghe <[email protected]>:
>>>
>>> This seems related to adding 'easy of use' methods to String.
>>>
>>> There are many different compression schemes (zip, bzip, bzip2, gzip,
>>> ...), are we going to add them all ?
>>>
>>> How much do we want to couple different parts of the system ?
>>>
>> I prefer to couple the compression schemes with String and ByteArray.
>> Methods like #zipped, #unzipped are not that simple and it is not well
>> apparent how to use that compression scheme.
>>
>> Cheers,
>> Juraj
>>
>>  On 25 Feb 2015, at 16:23, Juraj Kubelka <[email protected]> wrote:
>>>>
>>>> Can I add ByteArray>>#zipped and #unzipped methods the way it is for
>>>> String? I want to compress bytes before sending through internet, for
>>>> example.
>>>>
>>>> Do you agree?
>>>> Thanks,
>>>> Juraj
>>>>
>>>
>>>
>>
>>
>
>

Reply via email to