Dear Richard,
thanks for elaborating on your ideas. As I am still figuring out what works
best, I'll give them a try. Especially the approach to let the source deal
with passing the arguments to the block - though this requires more
changes.
The problem is NOT, as some commentators apparently
You say
- The source object returns multiple values as a tuple (for good reasons).
- The block processes theses values but needs another argument (at the
first place).
On the first point, we have to take your word for it.
It's not clear why you could not pass an n+1-element array to
the source m
.
-Original Message-
From: Steffen Märcker
Sent: April 11, 2023 09:44
To: Any question about pharo is welcome
Cc: v...@lists.cs.illinois.edu
Subject: [Pharo-users] Re: [vwnc] Block evaluation with n+1 arguments
Hi!
First, thanks for your engaging answers Richard, Stephane and the others!
The
Hi!
First, thanks for your engaging answers Richard, Stephane and the others!
The objective is to avoid unnecessary object creation in a tight loop that
interfaces between a value source and a block that processes the values.
- The source object returns multiple values as a tuple (for good reaso
Hi Stephane,
thanks for linking the upcoming lesson. I'll have a look. :-D
Best, Steffen
stephane.duca...@free.fr schrieb am Montag, 10. April 2023 16:03:16 (+02:00):
BTW to me when a block needs too many arguments it feels like that an object
has to be born :)
With an object I can just sen
>From the slides:
"What is the difference between a block and a simple object understanding
#value?"
The slides give the wrong answer. The right answer is that
- a block can see the variables of the blocks, method, and object
containing it
which allows ENCAPSULATION of long term and short te
Excellent write up, Stephane!
I will add that over the years, there have been many times (countless!) when
developing/debugging involved a complex block and that turned out to be
significant nuisance.
I can elaborate on the details, but once a block gets passed around, revising
it on the fly b