Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-23 Thread Andrew P. Black
On 17 Aug 2011, at 13:45 , Stéphane Ducasse wrote: I prefer execute :) because evaluate looks like you don't run fast and generate possibly assembly on the fly. I stopped long time ago to use evaluate because people also think that Smalltalk is slow because of that evaluation I'm

Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-18 Thread Philippe Marschall
On 17.08.2011 22:57, Henrik Sperre Johansen wrote: On 17.08.2011 22:29, Philippe Marschall wrote: On 17.08.2011 22:17, Stéphane Ducasse wrote: I wrote cull: anArg Execute the receiver with one or zero argument. [ 1 + 2 ] cull: 5 returns 3 [ :x | 1+ 2 + x] cull:

Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-18 Thread Henrik Johansen
On Aug 18, 2011, at 8:52 44AM, Philippe Marschall wrote: On 17.08.2011 22:57, Henrik Sperre Johansen wrote: On 17.08.2011 22:29, Philippe Marschall wrote: On 17.08.2011 22:17, Stéphane Ducasse wrote: I wrote cull: anArg Execute the receiver with one or zero argument. [ 1 + 2 ]

Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-18 Thread Guillermo Polito
What about making explicit in the comment that the arg is ignored if not needed? Something like cull: anArg Execute the receiver with one or zero argument. If the receiver needs less than one argument, the argument is ignored. ... Guille On Thu, Aug 18, 2011 at 4:17 AM, Henrik

[Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-17 Thread stephane ducasse
Hi guys I would like to get a better system and I would appreciate some comments for these methods. Stef

Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-17 Thread Stéphane Ducasse
I wrote cull: anArg Execute the receiver with one or zero argument. [ 1 + 2 ] cull: 5 returns 3 [ :x | 1+ 2 + x] cull: 5 returns 8 ^numArgs = 0 ifTrue: [self value] ifFalse: [self

Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-17 Thread Philippe Marschall
On 17.08.2011 22:17, Stéphane Ducasse wrote: I wrote cull: anArg Execute the receiver with one or zero argument. [ 1 + 2 ] cull: 5 returns 3 [ :x | 1+ 2 + x] cull: 5 returns 8 ^numArgs = 0 ifTrue:

Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-17 Thread Igor Stasenko
execute or evaluate? On 17 August 2011 23:17, Stéphane Ducasse stephane.duca...@inria.fr wrote: I wrote cull: anArg        Execute the receiver with one or zero argument.        [ 1 + 2 ] cull: 5                returns 3        [ :x | 1+ 2 + x] cull: 5                returns 8        

Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-17 Thread Igor Stasenko
this is a convenience methods On 17 August 2011 23:29, Philippe Marschall kus...@gmx.net wrote: On 17.08.2011 22:17, Stéphane Ducasse wrote: I wrote cull: anArg       Execute the receiver with one or zero argument.       [ 1 + 2 ] cull: 5               returns 3       [ :x | 1+ 2 + x]

Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-17 Thread Henrik Sperre Johansen
On 17.08.2011 22:11, stephane ducasse wrote: Hi guys I would like to get a better system and I would appreciate some comments for these methods. Stef Execute receiving block with as many arguments as it requires. This allows us to write blocks more concisely when we are not necessarily

Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-17 Thread Stéphane Ducasse
I prefer execute :) because evaluate looks like you don't run fast and generate possibly assembly on the fly. I stopped long time ago to use evaluate because people also think that Smalltalk is slow because of that evaluation silly idiots but they are out there. Stef (Ze mass educator)

Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-17 Thread Stéphane Ducasse
thanks I will be in the Block chapter I'm revising now :) On Aug 17, 2011, at 10:47 PM, Henrik Sperre Johansen wrote: On 17.08.2011 22:11, stephane ducasse wrote: Hi guys I would like to get a better system and I would appreciate some comments for these methods. Stef Execute receiving

Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-17 Thread Henrik Sperre Johansen
On 17.08.2011 22:29, Philippe Marschall wrote: On 17.08.2011 22:17, Stéphane Ducasse wrote: I wrote cull: anArg Execute the receiver with one or zero argument. [ 1 + 2 ] cull: 5 returns 3 [ :x | 1+ 2 + x] cull: 5 returns 8

Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-17 Thread Igor Stasenko
On 17 August 2011 23:45, Stéphane Ducasse stephane.duca...@inria.fr wrote: I prefer execute :) because evaluate looks like you don't run fast and generate possibly assembly on the fly. :) I stopped long time ago to use evaluate because people also think that Smalltalk is slow because of

Re: [Pharo-project] what are the comments of cull: cull: cull:cull: and friends?

2011-08-17 Thread Igor Stasenko
On 17 August 2011 23:57, Henrik Sperre Johansen henrik.s.johan...@veloxit.no wrote: On 17.08.2011 22:29, Philippe Marschall wrote: On 17.08.2011 22:17, Stéphane Ducasse wrote: I wrote cull: anArg        Execute the receiver with one or zero argument.        [ 1 + 2 ] cull: 5