Hacker News new | past | comments | ask | show | jobs | submit login

I believe it'd be idiomatic to use

  attr_accessor :sanity

  def initialize
    @sanity = 0
  end
On that note I like Go's default values for primitive types. An int sanity would be zero by default.

Edit: seeing five simultaneous posts saying the same thing makes me feel trolled a bit :)




Nah, Rails devs are just really excited to finally have their chance to shine in the HN comments ;)


You might want to participate in https://bugs.ruby-lang.org/issues/8564




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: