[squeak-dev] Re: [BUG] [ :a | ] value: 1

Stephen Pair stephen at pairhome.net
Wed Dec 16 18:35:23 UTC 2009


On Wed, Dec 16, 2009 at 1:24 PM, Eliot Miranda <eliot.miranda at gmail.com>wrote:
>
>
> I like Peter's response.  How about making it a preference? ;) ;)  What I
> mean is we replace the code by something that compiles code that either
> raises an error or answers nil.  y default the preference is set to generate
> the error code.  Then we force people to write [:arg| nil] because [:arg| ]
> will generate a run-time error (with a verbose and helpful explanatory
> comment).  Then in a few months, years, decades we'll be in a position to
> remove the preference and generate code that answers nil because all the
> uses will have been caught.
>
> I can imagine wanting to keep the preference and turning it on when
> importing code from other dialects for error checking.
>
> The downside to this approach is that empty blocks with arguments will
> include the "nil" noise.  But that;s very easy to remove automatically once
> the putsch is stable.
>

Egads!  I thought it was a really good joke at first, but now I realize you
are half serious.

Make it work right, fix all the code in the base image, maybe write
something that can reveal places where this is done in a particular class or
package, then publish it while reminding people of:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

- Stephen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20091216/ce6576ef/attachment.htm


More information about the Squeak-dev mailing list