From leavens@cs.iastate.edu Fri Sep 26 18:19:56 2003 Date: Fri, 26 Sep 2003 18:19:40 -0500 (CDT) From: Gary T. Leavens To: David Faden Cc: Staff for Com S 541 Subject: Re: Squeak-dev on having #new #initialize Hi David, On Fri, 26 Sep 2003, David Faden wrote: > There has recently been discussion on the Squeak-dev mailing list about > having #new automatically call #initialize on newly created instances. > I've included a couple of messages on the subject below. > > I get the impression that they actually are going to add some sort of > automatic initialization to Squeak. That's interesting. It seems like it would be a good idea, in my opinion. At least that could be a convention. > > > From: Ned Konz > > Date: Wed Sep 17, 2003 10:29:01 AM America/Chicago > > To: The general-purpose Squeak developers list > > > > Subject: Re: About KCP and automatic initialize > > Reply-To: The general-purpose Squeak developers list > > > > > > On Wednesday 17 September 2003 12:33 am, Richard A. O'Keefe wrote: > >> There is no argument against the KCP. > >> The argument against automatic #initialize is for the most part > >> not an argument against automatic initialisation. If it was > >> automatic #initializeYourself, there'd have been a > >> grumble-but-go-ahead. (And then we would have missed out on Andreas > >> Raab's wonderful suggestion.) > > > > On Wednesday 17 September 2003 01:08 am, ducasse wrote: > >> I have the impression that the discussions is not making progress > >> anymore so this is my last post on this topic. > >> Reread my emails to see what and why I think that this is good. > >> This is Concrete Reuse (tm). > > > > Stef, Noury: > > > > Perhaps I missed it, but I don't recall you addressing Richard's > > suggestion of adopting your change but using some other selector than > > #initialize to avoid breaking existing code. > > > > Its name is unimportant, as long as it's not already being used > > somewhere as an instance method. > > > > What do you think of this idea? We could still go through the code and > > clean up existing (mis) uses of the initialize patterns. > > > > -- > > Ned Konz > > http://bike-nomad.com > > GPG key ID: BEEA7EFE > > > > > > > > > > From: "Andreas Raab" > > Date: Wed Sep 17, 2003 12:15:52 PM America/Chicago > > To: "'The general-purpose Squeak developers list'" > > > > Subject: RE: About KCP and automatic initialize > > Reply-To: The general-purpose Squeak developers list > > > > > > Hi Ned, > > > >> Perhaps I missed it, but I don't recall you addressing Richard's > >> suggestion of adopting your change but using some other selector than > >> #initialize to avoid breaking existing code. > >> > >> Its name is unimportant, as long as it's not already being used > >> somewhere as an instance method. > > > > Its name is the single most important thing there is. We want to > > educate > > existing users and therefore we have to adopt (and partly change) > > existing > > patterns. Those patterns center around the use (or abuse) of > > initialize - > > everything else would be just Another Useless Selector (tm) which I > > would > > strictly oppose. The new/initialize pattern makes only sense if it is > > used > > for all of the existing and future code people get to see when they > > look at > > Squeak. Otherwise it's completely and utterly pointless - if you don't > > want > > to change people's habits why make the change at all? > > > >> What do you think of this idea? > > > > I hate it like mad ;-) > > > > Cheers, > > - Andreas > > > > > > > > > > -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 -------------------------------------- From leavens@cs.iastate.edu Wed Oct 1 18:22:48 2003 Date: Wed, 1 Oct 2003 18:22:20 -0500 (CDT) From: Gary T. Leavens To: Computer Science 541 -- Brett Graves , com_s_541@cs.iastate.edu, Yogy Namara Subject: COMS 541: How to print for HW3 #5 in 541, and blocks with > 4 arguments Hi, In class today I promised to tell you how to print from Squeak the drawings called for in problem 5. To print the morph, hold down hold down the ``alt'' key while you left click on the morph. Then click on the little menu icon that is in the second circle from the left at the top in the ``halo'' of buttons that appears. You'll get a menu, which a bit more than 1/2 of the way down, there is an item ``copy \& print'', from which you can select ``print Postscript to file...''. This will produce a eps file which you can print. Another question that I wanted to answer but didn't know off the top of my head is how to ask a block with more than 4 arguments to evaluate itself on the right number of arguments. Blocks have methods value:, value:value:, value:value:value:, and value:value:value:value: to handle 1-4 arguments. For larger numbers of arguments, you need to use the method valueWithArguments:, which takes an array. For example: [ :x :y :z :w :v | x + y + z + w + v ] valueWithArguments: #(10 1 3 20 100) returns 134 -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ----------------------------------------------- From leavens@larch.cs.iastate.edu Mon Oct 6 22:21:48 2003 Date: Mon, 6 Oct 2003 22:21:09 -0500 (CDT) From: Gary T. Leavens To: wfengm@cs.iastate.edu Subject: Re: Hi Hi Fengming, On Mon, 6 Oct 2003 wfengm@cs.iastate.edu wrote: > I have got a question about problem 7 of this homework. Do I have to make the > class BinaryRelation inherited directly from Collection? I think Set might be a > best choice to inherit from. No, you don't have to inherit directly from Collection; Set or any other subclass of Collection is fine. > btw: could I find the papers you recommended to me in the library or could you > send me a copy of that? You can find them in the library. Luca Cardelli's are also on his web site. Or I can lend you copies. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ----------------------------------------- From leavens@larch.cs.iastate.edu Tue Oct 21 16:31:02 2003 Date: Tue, 21 Oct 2003 16:30:46 -0500 (CDT) From: Gary T. Leavens To: Yogy Namara Subject: Ref on rep exposure etc. Hi Yogy, Here's that paper we disucssed after class on alias controlling type systems. @InProceedings{Noble-Vitek-Potter98, author = {James Noble and Jan Vitek and John Potter}, title = {Flexible Alias Protection}, BookTitle = {ECOOP '98 -- Object-Oriented Programming, 12th European Conference, Brussels, Belgium}, Editor = "Eric Jul", Series = LNCS, Volume = 1445, Month = Jul, Year = 1998, key = {Noble \& Vitek \& Potter}, publisher = {Springer-Verlag}, pages = {158-185} } -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------------