Paolo Bonzini wrote: > Mike Anderson wrote: >> I would really like to be able to dispense with the # in front of >> symbols in array literals. In other words, I would like the following to >> be valid: >> >> #(1 two nil) > > I'm not very happy about this. There's no reason, then, why #(nil) > should answer nil rather than #nil. I can make it give a warning if you > need compatibility, but I'd rather avoid fully backing the #(one two > three) syntax.
The reason is that true, false and nil are special variables; they are the only variables that you can include in an array literal. For that reason, they hide the symbols #true, #false and #nil. To formulate it another way, variables always hide symbols of the same name, but as it happens, there are only three that are allowed. Still, I'm not too bothered; it's part of the virtue of Smalltalk that I can load STInST and have it work the way I'd prefer (although in practice I might patch the VM). Mike _______________________________________________ help-smalltalk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-smalltalk
