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
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:
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 ]
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
Hi guys
I would like to get a better system and I would appreciate some comments for
these methods.
Stef
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
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:
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
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]
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
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)
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
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
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
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
15 matches
Mail list logo