[#2367] Standard libraries — Dave Thomas <dave@...>

From ruby-dev summary:

60 messages 2004/02/11

[#2397] PATCH: deprecate cgi-lib, getopts, importenv, parsearg from standard library — Gavin Sinclair <gsinclair@...>

Index: cgi-lib.rb

15 messages 2004/02/12

[#2465] PATCH: OpenStruct#initialize to yield self — Gavin Sinclair <gsinclair@...>

This is a common approach I use to object initialization; I don't know

24 messages 2004/02/19

Re: Intelligent eyes needed

From: Hugh Sasse Staff Elec Eng <hgs@...>
Date: 2004-02-28 21:26:31 UTC
List: ruby-core #2523
On Sun, 29 Feb 2004, Dave Thomas wrote:

> I've come up with
> http://www.pragmaticprogrammer.com/extracts/blocks.pdf as my first pass
> at an explanation. If folks have time, I'd really appreciate comments,

"The block may start with an argument list between vertical
bars.[...]The start of the block must be on the same locial line as
the end of the invocation"
    - Add "though the argument list may appear on the next line"
      perhaps, so it is clear that "start of the block" does not
      encompass the arguments?

Typo:  "In an iterator conext, next returns"
                         ^^^^

Reading:
    "[...]that block acts like a regular block, and the rules above
    apply"
My "less intelligent eyes" threw up:
    'What is a "*regular* block"? Didn't you just give two
    rules, which were different?'
Perhaps beginning that sentence with:
"If you use Proc.new (as opposed to Kernel.proc or Kernel.lambda,
discussed next)"
would help.  Possibly too heavy for something intended to be terse?

I'm looking forward to buying this book: these block/proc subtleties
are handled so well. Sneaking in that callback example was a nice
touch.  Thank you.

        Hugh

In This Thread

Prev Next