News for hackers. Stuff that matters.
Re:Crystal in Production: Diploid by werdnapk on Saturday October 28, 2017 @08:15PM (#15577378)
Ruby has new syntax to handle calling methods on null objects.

obj&.is&.nil? can replace the use of try obj.try(:is).try(:nil?)

Re:Crystal in Production: Diploid by rubyfan on Saturday October 28, 2017 @09:01PM (#15577528)
Agree, love this syntax

  obj = nil
  obj&.gsub("f","g") # => nil 
  obj = "food"
  obj&.gsub("f","g") # => "good" 
Unfortunately this is not likely second nature and will continue to bite us, especially where our expectations about AR models are not well thought out. A wrapping class for nillables might force safe access of AR attributes.