[#28687] [Bug #2973] rb_bug - Segmentation fault - error.c:213 — rudolf gavlas <redmine@...>

Bug #2973: rb_bug - Segmentation fault - error.c:213

10 messages 2010/03/16

[#28735] [Bug #2982] Ruby tries to link with both openssl and readline — Lucas Nussbaum <redmine@...>

Bug #2982: Ruby tries to link with both openssl and readline

16 messages 2010/03/18

[#28736] [Bug #2983] Ruby (GPLv2 only) tries to link to with readline (now GPLv3) — Lucas Nussbaum <redmine@...>

Bug #2983: Ruby (GPLv2 only) tries to link to with readline (now GPLv3)

10 messages 2010/03/18

[#28907] [Bug #3000] Open SSL Segfaults — Christian Höltje <redmine@...>

Bug #3000: Open SSL Segfaults

19 messages 2010/03/23

[#28924] [Bug #3005] Ruby core dump - [BUG] rb_sys_fail() - errno == 0 — Sebastian YEPES <redmine@...>

Bug #3005: Ruby core dump - [BUG] rb_sys_fail() - errno == 0

10 messages 2010/03/24

[#28954] [Feature #3010] slow require gems in ruby 1.9.1 — Miao Jiang <redmine@...>

Feature #3010: slow require gems in ruby 1.9.1

15 messages 2010/03/24

[#29179] [Bug #3071] Convert rubygems and rdoc to use psych — Aaron Patterson <redmine@...>

Bug #3071: Convert rubygems and rdoc to use psych

10 messages 2010/03/31

[ruby-core:28411] Re: [Feature #2515] Array#select!

From: Hugh Sasse <hgs@...>
Date: 2010-03-02 10:45:36 UTC
List: ruby-core #28411
I got tripped up by redmine there: I thought that was going off list,
but while the name of the addressee was there, the address was the
redmine one, which I didn't notice.  I'd argue that is a misfeature.

I think the case for orthogonality is a much stronger one than POLS.
select and reject are opposites, so having reject! and not select!
is not orthogonal, to my mind.

http://www.artima.com/intv/dry3.html

Roger's argument, it seems to me, is essentially that to achieve
an effect in one direction it is straightforward, but in the other
you have to interact either with another method, or with assignment,
a = a.select(&blocK)
a.reject!(&complementary_block)
This is rather like the helicopter pilot in the above (artima.com) story,
and there is a case for saying it makes the code less clear.  It is
a circumlocution.

I tend to use the assignment myself, though, because the ! signifier
is a rather subtle thing, visually, for something destructive[1].  The
assignment makes overwriting clearly apparent.  However, that would
be a case against almost all ! methods.   So if destructive methods
are idiomatic ruby, and if one may consider methods to be verbs, why
make the language unnecessarily irregular, especially when all these
reject, select, and map come from the same conceptual space of
functional programming?   [Of course, functional programming languages
don't allow variables to change value, once bound...]

Is there a significant cost to adding this, and is it more then the
cost of remembering the exceptions to the rules about which destructive
methods exist?  I've not looked at the source, yet, for this.

        Hugh

[1] To this same vision that failed to notice my message wasn't off
list.   That's why I used to use (*...*) comments in Pascal, in 
preference to {...}, because the printers back then made the star into
a big splat.  So I'm not saying Matz was wrong to choose this, I'm
saying my tastes differ.

On Tue, 2 Mar 2010, Yusuke Endoh wrote:

> Issue #2515 has been updated by Yusuke Endoh.
> 
> 
> Hi, Roger
> 
> Hugh Sasse wrote:
> > On Tue, 2 Mar 2010, Roger Pack wrote:
> > > It would be more convenient and less surprising to have a select!
> >
> > You can use the "surprising" argument 4 or more times if you like, but
> > since about 2005 Matz has said he will not accept changes
> > based on the Principle Of Least Surprise, because it is his surprise
> > that matters.
> 
> 
> I agree with Hugh.
> 
> In Ruby design, POLS is very unconvincing reason currently.  Instead,
> it may make an enemy of committer.
> 
> # Anyone should know that many committers are bored with suggestion
> # based on POLS.
> 
> In addition, consistency rarely beats name argument, AFAIK.  I propose
> you find another reason.
> 
> 
> I leave this ticket open for a couple of days.  But I'll close again
> if discussion will seem to be still stalemated.
> 
> -- 
> Yusuke ENDOH <mame@tsg.ne.jp>
> ----------------------------------------
> http://redmine.ruby-lang.org/issues/show/2515
> 
> ----------------------------------------
> http://redmine.ruby-lang.org
> 

In This Thread