[Squeakfoundation]ContextCleanupPlus-ajh (was: Re: KCP & 3.6)
Anthony Hannan
ajhannan at yahoo.com
Fri Jun 27 00:08:16 CEST 2003
Stephane Ducasse <ducasse at iam.unibe.ch> wrote:
> Anthony Hannan wrote:
> > Class>>becomeClass: otherClass - Become forward the other class and
> > fix up the global dictionary and system organization as well.
> Do you have some test for these one because I would like to know what
> is the consequence limit of becomeClass: especially in terms of the
> metaclass? Does it work on metaclass too?
Yes, but I have taken this change out as well as several others because I don't
use them anymore. If someone wants them I can post them in a separate package.
> By the way what is the difference between literal equal and ==. I'm
> sure there is one but your example does not bring that up front.
> 'foo' = #foo, but ('foo' literalEqual: #foo) not.
When compiling a method, multiple references to the same literal are combined
together into a single literal and held in the compiled method. Suppose you
have both 'foo' and #foo in your method. If the compiler uses #= it would
incorrectly combine 'foo' and #foo. Hence it uses #literalEqual: instead.
Previously this test was coded in long form in the compiler and other places
like CompiledMethod>>= that tested for literals..
> I want to know if these protocols work well in subclasses
> > SequenceableCollection>>allButFirstDo:,allButLastDo:,atLast:,atLast:put
> > :
> > ,copyGrowBy:copyWithFirst:,detectIndex:,reverseDetect:,slide:by:,with:w
> > i
> > thIndexDo:
As far as I know they work in subclasses. Some of been removed like
becomeClass: because they are no longer used.
> I really think that we should not introduce this that way.
> > Collection>>collectArray: - Same as collect: except always return an
> > array.
> Normally collect returns the same kind of collection that the one that
> is iterated, so what are the other alternatives.
> Anthony why do you need it and why (mycol collect: []) asArray or
> myColl asArray collect: []
> does not work. I imagine that this is too costly. So why don't you
> manipulate directly array or why do you need array at the end?
Your right. I removed this.
> > OrderedCollection>>bottom,top,pop,push,etc. - stack protocol.
> I really have a problem with this one. because I will get an
> orderedCollection sends it but I do not know what push means in
> terms of OrderedCollection because I will be able to send other message
> of orderedCollection to the collection and I can mess up everything.
> so why don't you implement a Stack if you need one and we can this
> class to the collection hierarchy.
Your right again. I removed this stack protocol from Collection. And changed
my code to use normal OrderedCollection protocol.
> > Number>>extend: - Like #to: except designate the length instead of the
last.
> DNU (but did not get the time to look inside)
I removed this one as well.
> and also to the point of Smacc. Using if using the output of a
> tool forces us to have the same license that the tool, I stop CS.
> Because I use latex and it does not mean that my articles are GNU
> license.
Goran answered this. We want everything changeable within Squeak.
Cheers,
Anthony
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
More information about the Squeakfoundation
mailing list