Why doesn't Ruby have Boolean class?

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Why doesn't Ruby have Boolean class?

https://burikaigi.dev/speakers/004/
This is BuriKaigi, so I talked about "Boolean (Bu-rian)" :)

Masafumi Okura

January 19, 2024

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

65 slides
  1. Ჳ

  2. ࣗݾ঺հ • ໊લɿେ૔խ࢙ • ॴଐɿϑϦʔϥϯε • ՝֎׆ಈɿKaigi on RailsνʔϑΦʔΨφΠβʔɺOSS։ൃɺ֤छొஃ ʢEuruko,

    RubyConfTw, VimConf, σϒαϛ2024ʣ • ޷͖ͳݴޠͳͲɿRubyɺRailsɺNeovim • ෋ࢁྺɿ2ճ໨
  3. Rejected for several reasons: many gems and libraries had already

    introduced Boolean class. I don't want to break them. true and false are the only representative of true-false values. In Ruby. nil and false are falsy values, and everything else is a true value. There's no meaning for having a superclass of TrueClass and FalseClass as Boolean. Matz. ʢԼઢ͸Ҿ༻ऀʣ
  4. Rejected for several reasons: many gems and libraries had already

    introduced Boolean class. I don't want to break them. true and false are the only representative of true-false values. In Ruby. nil and false are falsy values, and everything else is a true value. There's no meaning for having a superclass of TrueClass and FalseClass as Boolean. Matz. ʢԼઢ͸Ҿ༻ऀʣ
  5. Rejected for several reasons: many gems and libraries had already

    introduced Boolean class. I don't want to break them. true and false are the only representative of true-false values. In Ruby. nil and false are falsy values, and everything else is a true value. There's no meaning for having a superclass of TrueClass and FalseClass as Boolean. Matz. ʢԼઢ͸Ҿ༻ऀʣ

More Decks by Masafumi Okura

Other Decks in Programming