SMRTR ProgrammingOct 20, 2025Lobsters

Some Smalltalk about Ruby Loops

SMRTR summary

A programmer coming from Python discovers that Ruby loops work through message passing rather than traditional loop syntax. Instead of controlling iterations with `for` loops, Ruby sends messages like `:times` to objects, allowing each object to handle the iteration itself. This approach, inherited from Smalltalk's "protocol over syntax" philosophy, treats method calls as messages sent between objects. The design encourages more idiomatic Ruby code where objects have greater autonomy in determining their behavior.

SMRTR provides this summary for quick context. The original article belongs to Lobsters.

Read the original article
SMRTR Programming

Get the next batch of curated stories in your inbox.

This archive is built from SMRTR newsletter stories. Subscribe for hand-picked stories without the extra noise.

Related Stories

Browse Programming
ProgrammingAug 24, 2026

Programming Paradigms

A structured roadmap for experienced developers to move beyond language familiarity and genuinely master the four core programming paradigms.