On 2014-01-19 00:34, "Ola Fosheim Grøstad"
<[email protected]>" wrote:
I have not argued for not having a null. I have argued for trapping
null, instantiating a type specific default and recover if the type's
meta says so. That default could be to issue a NullException. At that
point you should be able to log null dereferences too.
I think nil (null) works quite nicely in Ruby. nil is a singleton
instance of the NilClass class. Since it's an object you can call
methods on it, like to_s, which returns an empty string. It works quite
well when doing web development with Ruby on Rails. If you're trying to
render something that's nil you'll get nothing, instead of crashing that
whole page. Sure, there might be a small icon or similar that isn't
rendered but that's usually a minor detail. If the page is working and
main content is rendered that's preferable.
--
/Jacob Carlborg