Re: [Pkg] The Trunk: Compression-ul.10.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Pkg] The Trunk: Compression-ul.10.mcz

Bert Freudenberg
Am 12.12.2009 um 15:20 schrieb [hidden email]:

>
> Levente Uzonyi uploaded a new version of Compression to project The Trunk:
> http://source.squeak.org/trunk/Compression-ul.10.mcz
>
> ==================== Summary ====================
>
> Name: Compression-ul.10
> Author: ul
> Time: 12 December 2009, 2:18:43 am
> UUID: 070e2365-df5f-514e-8d90-fa49c065cb01
> Ancestors: Compression-edc.9
>
> - replace sends of #ifNotNilDo: to #ifNotNil:, #ifNil:ifNotNilDo: to #ifNil:ifNotNil:, #ifNotNilDo:ifNil: to #ifNotNil:ifNil:

Why?

- Bert -


Reply | Threaded
Open this post in threaded view
|

Re: Re: [Pkg] The Trunk: Compression-ul.10.mcz

Igor Stasenko
2009/12/12 Bert Freudenberg <[hidden email]>:

> Am 12.12.2009 um 15:20 schrieb [hidden email]:
>>
>> Levente Uzonyi uploaded a new version of Compression to project The Trunk:
>> http://source.squeak.org/trunk/Compression-ul.10.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Compression-ul.10
>> Author: ul
>> Time: 12 December 2009, 2:18:43 am
>> UUID: 070e2365-df5f-514e-8d90-fa49c065cb01
>> Ancestors: Compression-edc.9
>>
>> - replace sends of #ifNotNilDo: to #ifNotNil:, #ifNil:ifNotNilDo: to #ifNil:ifNotNil:, #ifNotNilDo:ifNil: to #ifNotNil:ifNil:
>
> Why?
>

IMO, Consistency.
We should deprecate use of #ifNotNilDo: and friends, since now
compiler is fixed and supports 0/1 arguments in the #ifNotNil: arg.

> - Bert -
>
>
>



--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: [Pkg] The Trunk: Compression-ul.10.mcz

Andreas.Raab
Igor Stasenko wrote:

> 2009/12/12 Bert Freudenberg <[hidden email]>:
>> Am 12.12.2009 um 15:20 schrieb [hidden email]:
>>> Levente Uzonyi uploaded a new version of Compression to project The Trunk:
>>> http://source.squeak.org/trunk/Compression-ul.10.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Compression-ul.10
>>> Author: ul
>>> Time: 12 December 2009, 2:18:43 am
>>> UUID: 070e2365-df5f-514e-8d90-fa49c065cb01
>>> Ancestors: Compression-edc.9
>>>
>>> - replace sends of #ifNotNilDo: to #ifNotNil:, #ifNil:ifNotNilDo: to #ifNil:ifNotNil:, #ifNotNilDo:ifNil: to #ifNotNil:ifNil:
>> Why?
>>
>
> IMO, Consistency.
> We should deprecate use of #ifNotNilDo: and friends, since now
> compiler is fixed and supports 0/1 arguments in the #ifNotNil: arg.

Fair enough but let's try hard to make sure that these are actual
improvements and not just another cleansing jihad along the lines of
"ZOMG, you are using foo at: 1 instead of foo first???? TEH SKY IS
FALLING!!!".

(and in case you wonder the difference is that #ifNotNilDo: was in fact
a workaround for #ifNotNil: whereas #at: is not a workaround for #first
but a completely separate protocol and used independently - and
consequently where the first really can create more consistency the
latter achieves absolutely nothing and is an incorrect transformation to
boot)

Cheers,
   - Andreas

Reply | Threaded
Open this post in threaded view
|

Re: Re: [Pkg] The Trunk: Compression-ul.10.mcz

Levente Uzonyi-2
In reply to this post by Bert Freudenberg
On Sat, 12 Dec 2009, Bert Freudenberg wrote:

> Am 12.12.2009 um 15:20 schrieb [hidden email]:
>>
>> Levente Uzonyi uploaded a new version of Compression to project The Trunk:
>> http://source.squeak.org/trunk/Compression-ul.10.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Compression-ul.10
>> Author: ul
>> Time: 12 December 2009, 2:18:43 am
>> UUID: 070e2365-df5f-514e-8d90-fa49c065cb01
>> Ancestors: Compression-edc.9
>>
>> - replace sends of #ifNotNilDo: to #ifNotNil:, #ifNil:ifNotNilDo: to #ifNil:ifNotNil:, #ifNotNilDo:ifNil: to #ifNotNil:ifNil:
>
> Why?
>

Because it works, it's simpler, it's faster. I always thought that
#ifNotNilDo: is just a workaround, because the compiler's inlining didn't
accept the block with the argument.


Levente


> - Bert -
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Re: [Pkg] The Trunk: Compression-ul.10.mcz

Levente Uzonyi-2
In reply to this post by Igor Stasenko
On Sat, 12 Dec 2009, Igor Stasenko wrote:

> 2009/12/12 Bert Freudenberg <[hidden email]>:
>> Am 12.12.2009 um 15:20 schrieb [hidden email]:
>>>
>>> Levente Uzonyi uploaded a new version of Compression to project The Trunk:
>>> http://source.squeak.org/trunk/Compression-ul.10.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Compression-ul.10
>>> Author: ul
>>> Time: 12 December 2009, 2:18:43 am
>>> UUID: 070e2365-df5f-514e-8d90-fa49c065cb01
>>> Ancestors: Compression-edc.9
>>>
>>> - replace sends of #ifNotNilDo: to #ifNotNil:, #ifNil:ifNotNilDo: to #ifNil:ifNotNil:, #ifNotNilDo:ifNil: to #ifNotNil:ifNil:
>>
>> Why?
>>
>
> IMO, Consistency.
> We should deprecate use of #ifNotNilDo: and friends, since now
> compiler is fixed and supports 0/1 arguments in the #ifNotNil: arg.

+1


Levente

>
>> - Bert -
>>
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Re: [Pkg] The Trunk: Compression-ul.10.mcz

Bert Freudenberg
In reply to this post by Levente Uzonyi-2
Am 13.12.2009 um 04:57 schrieb Levente Uzonyi:

>
> On Sat, 12 Dec 2009, Bert Freudenberg wrote:
>
>> Am 12.12.2009 um 15:20 schrieb [hidden email]:
>>>
>>> Levente Uzonyi uploaded a new version of Compression to project The Trunk:
>>> http://source.squeak.org/trunk/Compression-ul.10.mcz
>>>
>>> ==================== Summary ====================
>>>
>>> Name: Compression-ul.10
>>> Author: ul
>>> Time: 12 December 2009, 2:18:43 am
>>> UUID: 070e2365-df5f-514e-8d90-fa49c065cb01
>>> Ancestors: Compression-edc.9
>>>
>>> - replace sends of #ifNotNilDo: to #ifNotNil:, #ifNil:ifNotNilDo: to #ifNil:ifNotNil:, #ifNotNilDo:ifNil: to #ifNotNil:ifNil:
>>
>> Why?
>
> Because it works, it's simpler, it's faster. I always thought that #ifNotNilDo: is just a workaround, because the compiler's inlining didn't accept the block with the argument.

I see.

It's just that methods that accept variadic blocks do not feel right to me. Maybe in other languages this is more commonly used, but it seems less "Smalltalky" to me.

- Bert -