Loop Abstractions in D
One of the great things with Ruby is the natural way in which you can hide looping constructs behind descriptive names. Like the retryable example that Cheah Chu Yeow gives on his blog.
retryable(:tries => 5, :on => OpenURI::HTTPError) do
open(’http://example.com/flaky_api’)
end
Notice how elegantly the loop logic is abstracted; There’s no need to look at the [...]