Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.818.mcz ==================== Summary ==================== Name: Kernel-nice.818 Author: nice Time: 2 November 2013, 12:05:29.34 am UUID: 3dae8edc-b873-491e-8b54-596cae38eb5f Ancestors: Kernel-cmm.817 Avoid spurious warnings in Class>>rename: when an Undeclared isn't really referenced. This may help some SUnit tests to pass. =============== Diff against Kernel-cmm.817 =============== Item was changed: ----- Method: Class>>rename: (in category 'class name') ----- rename: aString "The new name of the receiver is the argument, aString." | oldName newName | (newName := aString asSymbol) = (oldName := self name) ifTrue: [^ self]. (self environment includesKey: newName) ifTrue: [^ self error: newName , ' already exists']. + ((self environment undeclared includesKey: newName) + and: [(self environment undeclared unreferencedKeys includes: newName) not]) - (self environment undeclared includesKey: newName) ifTrue: [self inform: 'There are references to ' , aString printString , ' from Undeclared. Check them after this change.']. name := newName. self environment renameClass: self from: oldName! |
On 1 November 2013 23:10, <[hidden email]> wrote:
> Nicolas Cellier uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-nice.818.mcz > > ==================== Summary ==================== > > Name: Kernel-nice.818 > Author: nice > Time: 2 November 2013, 12:05:29.34 am > UUID: 3dae8edc-b873-491e-8b54-596cae38eb5f > Ancestors: Kernel-cmm.817 > > Avoid spurious warnings in Class>>rename: when an Undeclared isn't really referenced. > > This may help some SUnit tests to pass. > > =============== Diff against Kernel-cmm.817 =============== This is exactly the same as Trait >> #rename:. Is there a way to remove the duplication? What would be a good reason not to push this up to ClassDescription? (Maybe that this would imply that you can #rename: a Metaclass?) frank |
Hehe, once upon a time, that was a reason for implementing Traits with Traits, but we reverted because it did prevent Trait removal. Also, the implementation was considered heavy, and Andreas opted for a much lighter one. Right now we still live with some duplications though... 2013/11/2 Frank Shearar <[hidden email]>
|
Well, if we moved #rename: up to ClassDescription, the Traits package
would simply depend on Kernel, as it already does. Otherwise, I fully approve of keeping Traits unloadable. (But really, they're a very neat idea with interesting possibilities. If only Someone would make the tools work properly with them.) frank On 2 November 2013 11:56, Nicolas Cellier <[hidden email]> wrote: > Hehe, once upon a time, that was a reason for implementing Traits with > Traits, but we reverted because it did prevent Trait removal. Also, the > implementation was considered heavy, and Andreas opted for a much lighter > one. > Right now we still live with some duplications though... > > > 2013/11/2 Frank Shearar <[hidden email]> >> >> On 1 November 2013 23:10, <[hidden email]> wrote: >> > Nicolas Cellier uploaded a new version of Kernel to project The Trunk: >> > http://source.squeak.org/trunk/Kernel-nice.818.mcz >> > >> > ==================== Summary ==================== >> > >> > Name: Kernel-nice.818 >> > Author: nice >> > Time: 2 November 2013, 12:05:29.34 am >> > UUID: 3dae8edc-b873-491e-8b54-596cae38eb5f >> > Ancestors: Kernel-cmm.817 >> > >> > Avoid spurious warnings in Class>>rename: when an Undeclared isn't >> > really referenced. >> > >> > This may help some SUnit tests to pass. >> > >> > =============== Diff against Kernel-cmm.817 =============== >> >> This is exactly the same as Trait >> #rename:. Is there a way to >> remove the duplication? What would be a good reason not to push this >> up to ClassDescription? (Maybe that this would imply that you can >> #rename: a Metaclass?) >> >> frank >> > > > > |
On Sat, 2 Nov 2013, Frank Shearar wrote:
> Well, if we moved #rename: up to ClassDescription, the Traits package > would simply depend on Kernel, as it already does. > > Otherwise, I fully approve of keeping Traits unloadable. (But really, > they're a very neat idea with interesting possibilities. If only > Someone would make the tools work properly with them.) I consider Traits to be dead end. They don't fit well into the system. With less effort a more powerful solution could have been implemented without introducing a new kind of Behavior. Levente > > frank > > On 2 November 2013 11:56, Nicolas Cellier > <[hidden email]> wrote: >> Hehe, once upon a time, that was a reason for implementing Traits with >> Traits, but we reverted because it did prevent Trait removal. Also, the >> implementation was considered heavy, and Andreas opted for a much lighter >> one. >> Right now we still live with some duplications though... >> >> >> 2013/11/2 Frank Shearar <[hidden email]> >>> >>> On 1 November 2013 23:10, <[hidden email]> wrote: >>>> Nicolas Cellier uploaded a new version of Kernel to project The Trunk: >>>> http://source.squeak.org/trunk/Kernel-nice.818.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: Kernel-nice.818 >>>> Author: nice >>>> Time: 2 November 2013, 12:05:29.34 am >>>> UUID: 3dae8edc-b873-491e-8b54-596cae38eb5f >>>> Ancestors: Kernel-cmm.817 >>>> >>>> Avoid spurious warnings in Class>>rename: when an Undeclared isn't >>>> really referenced. >>>> >>>> This may help some SUnit tests to pass. >>>> >>>> =============== Diff against Kernel-cmm.817 =============== >>> >>> This is exactly the same as Trait >> #rename:. Is there a way to >>> remove the duplication? What would be a good reason not to push this >>> up to ClassDescription? (Maybe that this would imply that you can >>> #rename: a Metaclass?) >>> >>> frank >>> >> >> >> >> > > |
On 2 November 2013 12:26, Levente Uzonyi <[hidden email]> wrote:
> On Sat, 2 Nov 2013, Frank Shearar wrote: > >> Well, if we moved #rename: up to ClassDescription, the Traits package >> would simply depend on Kernel, as it already does. >> >> Otherwise, I fully approve of keeping Traits unloadable. (But really, >> they're a very neat idea with interesting possibilities. If only >> Someone would make the tools work properly with them.) > > > I consider Traits to be dead end. They don't fit well into the system. With > less effort a more powerful solution could have been implemented without > introducing a new kind of Behavior. With the proviso that "Traits is a dead end" is a completely separate discussion (and one that I seriously disagree with - take a look at all the languages that have picked up traits and run with them), I'm specifically referring to the duplication. Actually, I'd rather rip #rename: out of Class and drive it where it belongs, in Environment. But that's something that needs more discussion. But in particular, traits don't fit well into the system because _noone did the work_. Pharo still has this problem, because _noone's done the work_. frank > Levente > > >> >> frank >> >> On 2 November 2013 11:56, Nicolas Cellier >> <[hidden email]> wrote: >>> >>> Hehe, once upon a time, that was a reason for implementing Traits with >>> Traits, but we reverted because it did prevent Trait removal. Also, the >>> implementation was considered heavy, and Andreas opted for a much lighter >>> one. >>> Right now we still live with some duplications though... >>> >>> >>> 2013/11/2 Frank Shearar <[hidden email]> >>>> >>>> >>>> On 1 November 2013 23:10, <[hidden email]> wrote: >>>>> >>>>> Nicolas Cellier uploaded a new version of Kernel to project The Trunk: >>>>> http://source.squeak.org/trunk/Kernel-nice.818.mcz >>>>> >>>>> ==================== Summary ==================== >>>>> >>>>> Name: Kernel-nice.818 >>>>> Author: nice >>>>> Time: 2 November 2013, 12:05:29.34 am >>>>> UUID: 3dae8edc-b873-491e-8b54-596cae38eb5f >>>>> Ancestors: Kernel-cmm.817 >>>>> >>>>> Avoid spurious warnings in Class>>rename: when an Undeclared isn't >>>>> really referenced. >>>>> >>>>> This may help some SUnit tests to pass. >>>>> >>>>> =============== Diff against Kernel-cmm.817 =============== >>>> >>>> >>>> This is exactly the same as Trait >> #rename:. Is there a way to >>>> remove the duplication? What would be a good reason not to push this >>>> up to ClassDescription? (Maybe that this would imply that you can >>>> #rename: a Metaclass?) >>>> >>>> frank >>>> >>> >>> >>> >>> >> >> > |
On Sat, 2 Nov 2013, Frank Shearar wrote:
> On 2 November 2013 12:26, Levente Uzonyi <[hidden email]> wrote: >> On Sat, 2 Nov 2013, Frank Shearar wrote: >> >>> Well, if we moved #rename: up to ClassDescription, the Traits package >>> would simply depend on Kernel, as it already does. >>> >>> Otherwise, I fully approve of keeping Traits unloadable. (But really, >>> they're a very neat idea with interesting possibilities. If only >>> Someone would make the tools work properly with them.) >> >> >> I consider Traits to be dead end. They don't fit well into the system. With >> less effort a more powerful solution could have been implemented without >> introducing a new kind of Behavior. > > With the proviso that "Traits is a dead end" is a completely separate > discussion (and one that I seriously disagree with - take a look at > all the languages that have picked up traits and run with them), I'm > specifically referring to the duplication. Actually, I'd rather rip > #rename: out of Class and drive it where it belongs, in Environment. > But that's something that needs more discussion. > > But in particular, traits don't fit well into the system because > _noone did the work_. Pharo still has this problem, because _noone's > done the work_. He's a discussion about this topic from 2010: http://lists.gforge.inria.fr/pipermail/pharo-project/2010-October/034771.html Levente > > frank > >> Levente >> >> >>> >>> frank >>> >>> On 2 November 2013 11:56, Nicolas Cellier >>> <[hidden email]> wrote: >>>> >>>> Hehe, once upon a time, that was a reason for implementing Traits with >>>> Traits, but we reverted because it did prevent Trait removal. Also, the >>>> implementation was considered heavy, and Andreas opted for a much lighter >>>> one. >>>> Right now we still live with some duplications though... >>>> >>>> >>>> 2013/11/2 Frank Shearar <[hidden email]> >>>>> >>>>> >>>>> On 1 November 2013 23:10, <[hidden email]> wrote: >>>>>> >>>>>> Nicolas Cellier uploaded a new version of Kernel to project The Trunk: >>>>>> http://source.squeak.org/trunk/Kernel-nice.818.mcz >>>>>> >>>>>> ==================== Summary ==================== >>>>>> >>>>>> Name: Kernel-nice.818 >>>>>> Author: nice >>>>>> Time: 2 November 2013, 12:05:29.34 am >>>>>> UUID: 3dae8edc-b873-491e-8b54-596cae38eb5f >>>>>> Ancestors: Kernel-cmm.817 >>>>>> >>>>>> Avoid spurious warnings in Class>>rename: when an Undeclared isn't >>>>>> really referenced. >>>>>> >>>>>> This may help some SUnit tests to pass. >>>>>> >>>>>> =============== Diff against Kernel-cmm.817 =============== >>>>> >>>>> >>>>> This is exactly the same as Trait >> #rename:. Is there a way to >>>>> remove the duplication? What would be a good reason not to push this >>>>> up to ClassDescription? (Maybe that this would imply that you can >>>>> #rename: a Metaclass?) >>>>> >>>>> frank >>>>> >>>> >>>> >>>> >>>> >>> >>> >> > > |
Free forum by Nabble | Edit this page |