Hi --

On Mon, 9 Feb 2009, Robert Dober wrote:

> On Sun, Feb 8, 2009 at 2:44 PM, David A. Black <dblack / rubypal.com> wrote:
>
>>
>> I'm not sure you need a "though"; that's essentially the point I was
>> making :-)
> Actually the 'though' was here because we do not agree on the special
> usecase for #=== I am quite fond of, and I know that. But that was
> quite cryptic for the rest of the world, sorry.
>
> BTW it would help me a lot to understand better why my approach of
> using #=== on well defined classes, Class and Regexp that is, does not
> help to learn.
> This is not about bad code or good code, because I will just not agree that
>   /===/ === "==="
> is bad code ;). [ In my eyes this is probably the most beautiful LOC I
> have *ever* written, LOL]
>
> My question would go to the teacher as follows:
>   Would students not be curious about seeing an unfamiliar idiom? Is
> that not often the motivation of posting questions on this list and
> sometimes having quite interesting threads.
> Funily I try to prove my assumption with this thread, sort of :).
> If you feel this is too OT, never mind.

I'm not making a pronouncement that no one should ever see an
unfamiliar idiom in Ruby. That wouldn't make sense, since we're not
born knowing Ruby :-)

But I don't think that Ruby practitioners should decide which idioms
to use based on choosing the one that newcomers are least likely to be
able to understand. The process of people seeing code they don't
understand and asking questions about it is not endangered. It will
keep happening, and it's not really micro-manageable anyway; I don't
think one can plant a particular idiom somewhere with any knowledge
that a nuby is going to spot exactly that usage and wonder about it.


David

-- 
David A. Black / Ruby Power and Light, LLC
Ruby/Rails consulting & training: http://www.rubypal.com
Coming in 2009: The Well-Grounded Rubyist (http://manning.com/black2)

http://www.wishsight.com => Independent, social wishlist management!