On Fri, Dec 28, 2012 at 2:01 PM, Damián M. González <[email protected]> wrote: >> The more I think about it the more I do believe it is responsibility >> of the "driver" (i.e. the bit that fetches the data) to return _proper >> data_. In this case it would mean: do not return numbers as strings. >> If values are invalid return a special value for that; this value >> could be nil or one or more symbols depending on how many states need >> to be represented. >> >> The using code should expect data properly typed so it can do its >> business. > > Yes that ensure a proper work, but he says that at any time can enter a > new antenna, and he wants to quickly put it working,
And where is the problem with my approach? Does it prevent getting new devices to work quickly? > so what we know is > that all the null values are returned as strings. Perhaps just the null > values are always returned as strings, the others values meaby are > returned as Fixnums, so he wants to handle strings. I'd rather not speculate but hear Brandon's comment on this. Also, even if what you say is true it still does not prevent the "driver" layer to convert "null" strings into nil or something other meaningful value. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
