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

Levente Uzonyi leves at caesar.elte.hu
Wed Feb 26 11:20:00 UTC 2020


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.


Levente

> 
> It fits in with why we format code across multiple, indented lines -- it's not the most concise, but it is more literate.  Literacy is about communicating well with readers, not necessarily always writing the most-concise thing possible...
> 
> 
> 
>


More information about the Squeak-dev mailing list