Ruby Impressions

Jason Orendorff jason at jorendorff.com
Sun Jan 13 13:54:51 EST 2002


> class Person
>   init_attributes(:name, :age, :gender)
> end
> 
> The resulting code requires less typing, yes, but that wasn't the
> point. The point is that it expresses my intention directly, and
> contains less duplication. This makes my code *easier* to read, as
> long as the reader knows what the init_attributes() subroutine does.

But how many readers do?

Abstraction is good, yes, but *too many* layers of abstraction
can make things *harder* to understand, not eaiser - and less
efficient.  History is littered with examples of this.

Let's see the source code to init_attributes().  That would help
me appreciate its usefulness.


You know, people initialize objects all the time.
If the most direct, idiomatic code for this common task
is too wordy, then that's the language's fault, and it's no
virtue that the language lets you write a so-called "elegant"
workaround.

Anyway, the crack about the Python community being less
"open to new ideas" than the Ruby community seems pretty
silly to me.  Everyone's here to learn.

Cheers.

## Jason Orendorff    http://www.jorendorff.com/




More information about the Python-list mailing list