[squeak-dev] The Inbox: Tools-ct.945.mcz

Chris Muller ma.chris.m at gmail.com
Wed Feb 26 22:24:55 UTC 2020


On Wed, Feb 26, 2020 at 5:20 AM Levente Uzonyi <leves at caesar.elte.hu> wrote:

> On Tue, 25 Feb 2020, Chris Muller wrote:
>
> > Agree with Eliot on all except this one:
> >
> >       and to have to say [nil] instead of [].
> >
> >
> > because empty blocks are ambiguous with incomplete code.  That's why, if
> nil is "supposed" to be the return value, I always explicitly specify it,
> as I would any other value, and not an empty block.
> >
> > If the return value isn't consumed, and I simply wish to "do nothing",
> then I'll write a short comment like, "do nothing" to express the that
> intention.  Leaving it empty could cause future readers to wonder whether
> the code was ever finished, or not.
>
> In the context of the Trunk, that assumption would be wrong.
> Incomplete code with no documentation has no place in there.
>

I like your commitment to quality!  :)   But, it ignores the previous
sentences about expressivity of intent, standing on its own in the code.
Future readers might be unaware of trunk's quality-control measures, which
evolved over time.

We still write sends to #yourself to reveal intention, even though it's
less concise..

I'm game enough myself to read empty blocks, but I don't care to write
them, because I think there's a slight disadvantage for outside readers,
regardless of literacy, in leaving them ambiguous.

 - Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200226/3b5b80b5/attachment.html>


More information about the Squeak-dev mailing list