From: Clark C. E. <cc...@cl...> - 2002-09-08 18:04:41
|
On Sun, Sep 08, 2002 at 10:56:52AM -0700, Mike Orr wrote: | On Sun, Sep 08, 2002 at 02:47:02PM +0000, Clark C. Evans wrote: | > this: # is ambiguous, is it a scalar, mapping or sequence? | | > but this: [] # is an empty sequence | > and this: {} # is an empty mapping | > so this: '' # is an empty string | > while this: () # is _null_ type (currently ~ in the current spec) | | What would be hurt if we assume an empty value is ''? | Is there a legitimate reason not to type [] or {} when you | mean an empty collection? And since null is a special | value (some applications never want to see a null ever), | it follows that it should have a special syntax. this: > is a scalar and this: this is a mapping: since it has a key/value pair but what is: # this: with a commented out key? In the current spec, the above is an error so that someone commenting out keys won't accidently turn a mapping into a scalar. I hope this helps! Clark |