nil or #nil?

Tim Rowledge rowledge at
Mon Aug 24 11:51:29 UTC 1998

> Dan wrote:
> >>Right now, the rule for what #() does is pretty simple.  Part of the
> >>Smalltalk design approach is to minimize the number of rules wherever
> >>possible, even if this means it doesn't always provide the absolute
> >>most convenient result.
> Stefan replied:
> >I hate to contradict the inventor of the language, but the current rule for
> >literal arrays is more difficult than needed. Why are symbols represented
> >differently inside literal arrays than outside. IMHO, the rule should be
> >that #(a b) is an error and only #(#a #b) is permitted.  This would allow
> >one to simplify the BNF-rule for literals...
How much simpler can the rule be? It's a literal array, that is an array of
literals. So it can contain literal numbers, literal strings, literal
symbols, other literal arrays. Simple. nil & true & self are not literals,
so they don't go in literal arrays.

Useful random insult:- One chip short of a cookie.
Tim Rowledge:  rowledge at (w)  +1 (650) 842-6110 (w)
 tim at (h)  <>

More information about the Squeak-dev mailing list