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 - |
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. |
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 |
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 - > > > |
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. > > |
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 - |
Free forum by Nabble | Edit this page |