[Newbies] Re: Re: How to empty a collection?

2008-02-19 Thread Klaus D. Witzel

On Tue, 19 Feb 2008 17:21:57 +0100, Klaus D. Witzel wrote:


On Tue, 19 Feb 2008 16:56:48 +0100, cdrick wrote:



 Or maybe, if aCollection == self, a warning could be raised ?

 What do you think ?

Thumbs down, I do not want anybody copy a collection behind my back
(however small or large it is) just because remove* has nothing to do  
with copy.



Ok, I can understand.
What about the error ?


This is a bug, Smalltalk cannot compromise its fundamental structures  
(#removeAll is ANSI). Enter the report if not already on mantis  attach  
your fix.


Sorry, s/#removeAll /#removeAll: /


/Klaus




___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Re: Re: How to empty a collection?

2008-02-19 Thread Klaus D. Witzel

On Tue, 19 Feb 2008 16:56:48 +0100, cdrick wrote:



 Or maybe, if aCollection == self, a warning could be raised ?

 What do you think ?

Thumbs down, I do not want anybody copy a collection behind my back
(however small or large it is) just because remove* has nothing to do  
with copy.



Ok, I can understand.
What about the error ?


This is a bug, Smalltalk cannot compromise its fundamental structures  
(#removeAll is ANSI). Enter the report if not already on mantis  attach  
your fix.


/Klaus


___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Re: [Newbies] Re: Re: How to empty a collection?

2008-02-19 Thread cdrick
  
   Or maybe, if aCollection == self, a warning could be raised ?
  
   What do you think ?
 
  Thumbs down, I do not want anybody copy a collection behind my back
  (however small or large it is) just because remove* has nothing to do
  with copy.
 
  Ok, I can understand.
  What about the error ?

 This is a bug, Smalltalk cannot compromise its fundamental structures
 (#removeAll is ANSI). Enter the report if not already on mantis  attach
 your fix.


I actually didn't meant it was a bug :) I need to be sharper with
my english... I meant raising an error message if self == aCollection
... Could it be a fix ?

Because in a way, the behavior is not really an error, it's more a bad
use because we know it's iterative and then, self and aCollection
change in the same time...

I hope you don't take my remarks, as I want to change smalltalk... I
just want to understand it better ;)

Cheers

Cédrick

ps: by the way, I'll open a bug report, as finally I think it's an
error (arf) because I shouldn't be aware removeAll is
iterativeetc... so here is the bug report
(http://bugs.squeak.org/view.php?id=6937).
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners