Ruby's private keyword is weird – Jake Zimmerman

Ruby’s private keyword means something different compared to basically all other object-oriented languages. Most other languages don’t even have a feature matching what Ruby calls private, but incredibly, Scala does, which it calls protected[this] (meaning “object-protected”, as opposed to the normal protected keyword which is called “class-protected”).First let’s review what private normally means, and then discuss what private in Ruby means (which will also amount to an explanation of what protected[this] means in Scala).
Ruby's private keyword is weird – Jake Zimmerman #ruby #rubydeveloper #rubyonrails https://rubyonrails.ba/single/ruby-s-private-keyword-is-weird-jake-zimmerman

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles