TLDR Web Dev · ARTICLES & TUTORIALS

RUBY METHODS ARE COLORLESS

jpcamara.com26 min read

Summary from the TLDR Web Dev newsletter

Ruby methods are "colorless," meaning there's no distinction between synchronous and asynchronous methods, allowing for asynchronous behavior without explicit markers. Ruby achieves this through independent call stacks, enabled by Threads and Fibers, which allow for switching between tasks without blocking the main thread. This concurrency model, similar to Go's, allows for efficient handling of blocking operations like file reading, HTTP calls, and database queries.