[squeak-dev] Question about "variables" button in browser

Marcel Taeumel marcel.taeumel at hpi.de
Tue Jul 12 06:03:45 UTC 2022


> There's one case where pool variables are better than messages:
> for sets of constants heavily used across a code base.

And why is that? :-)
- Less typing/reading effort at development time?
- Faster access at run-time?
- Both of the above?

:-D

That's what I meant. Shared pools do not break encapsulation
more or less than having class-side messages to return constants.

Best,
Marcel
Am 12.07.2022 02:08:04 schrieb Chris Muller <asqueaker at gmail.com>:
Whether to use a message send or direct access via
a pool goes along the lines of accessors-vs-instVar-Access.
I prefer message sends. Direct access can be faster,
which I exploited in Squeak FFI type accessors and
generated code.

There's one case where pool variables are better than messages:  for sets of constants heavily used across a code base.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220712/7b964783/attachment.html>


More information about the Squeak-dev mailing list