Bad Ruby

Ruby's dynamic features make it easy to write low-ceremony code. Unlike many languages today, Ruby allows you to

  • Override calls to new
  • Generate new classes and methods at runtime
  • Evaluate code on-the-fly
  • Dynamically respond to methods with method_missing
  • Create headerless source code files

But you should not be satisfied with these. Ruby's abstractions are neither as rich, nor as composable, as they could be. In this talk, we will look at what's wrong with Ruby. Issues include:

  • Unnecessary language features such as class variables
  • Syntax variations that require you to overspecify (e.g. instance variables)
  • Limitations of Ruby reflection
  • Second-class citizens, such as blocks

And, of course, we will show specific, real-world examples where these limitations lead to unmaintainable, legacy code.

Avoid these pitfalls, and your Ruby code will be more maintainable. And you will develop a keen sense of what to look for in Ruby's successor.

Get In Touch