From: ahoward Date: 2003-02-20T01:11:37+09:00 Subject: Re: How to test for existence of instance variable? On Thu, 20 Feb 2003, Paul Brannan wrote: > This is only a problem for dynamically-added attributes, since > attributes that are known when the object is created can (and should) be > initialized to nil. i disagree with this, i would never do this in C struct { int x; } s; bzero (&s, sizeof (s)); s.x = 0; /* redundant! */ just as i would never in ruby do class S attr_accessor :x def initialize @x = nil # redundant end end s = S.new since ruby does this for me and it simply clutters the source file IMHO. -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================