On Sat, 18 Jan 2003 dblack / candle.superlink.net wrote: > This is different, though, from having the (attempted) call to the method > itself return NACK. yes. but the same thing can be accompished. > Also, I'm not sure what the difference is between your false and nil cases. ??? ~ > irb irb(main):001:0> false == nil false irb(main):002:0> false === nil false the extra 'nil' return from respond_to? can easily have the NACK semantic since it is distinguishable from 'false'. > No, respond_to?(:meth) doesn't pertain to local variables. hmmmm. i said 'ameth' pertained to local vars,not :ameth. they are different in tom's example. > Also, symbols aren't specifically compile-time things; they can be > dynamically generated. really? how? i would like to know how to do that if it is possible. i don't counting eval since in eval ':sym' the recognition of :sym occurs at compile time (of the string) and counting this would be like saying any language which can generate, compile, and load code at runtime is dynamic: like calling a C program which writes, compiles into a *.so, and dl_opens a library 'dynamic'. > The idea of NACK would be to have a way to accomplish both the test for > method existence, and the actual call of the method, in one expression, > instead of having to break them out as in Tom's example. is the issue that begin object.meth *args; rescue NameError; end isn't short enough? i guess i can understand that, but hiding (by making too concise) throwing/catching of exceptions reminds me of a certain 'p' language. after working in c++ and java i feel that ruby's exceptions are concise enough to not be problematic, while being sufficiently verbose to stand out in code. i think this is really a good thing because shortcuts provided to ignore exceptions would be a little *too* tempting to use - and forget about - 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 ====================================