swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: messages to nil


From: David Stes
Subject: Re: messages to nil
Date: Mon, 27 Apr 1998 00:07:26 +0200 (MET DST)

Rick Riolo wrote:

> One of our users asked about messages to nil and what
> a pain it is that they don't generate a warning.

With the Portable Object Compiler (which is a precompiler available, for
example, at http://sunsite.unc.edu/pub/Linux/devel/lang/objc), I do this
with a flag called "-noNilRcvr". 

For example :

  mix>cat example.m

  #include "objc.h"
  main() {  [nil self]; printf("done\n"); }

  mix>objc -q example.m
  mix>a.out
  done
  mix>objc -q -noNilRcvr example.m
  mix>a.out
  Message backtrace:
   self
  error: Message 'self' sent to nil.
  Abort trap

There's probably arguments in favor (and against) either approach.  The
default has traditionally been to allow nil receivers ...

David.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]