[#6363] Re: rescue clause affecting IO loop behavior — ts <decoux@...>

>>>>> "D" == David Alan Black <dblack@candle.superlink.net> writes:

17 messages 2000/11/14
[#6367] Re: rescue clause affecting IO loop behavior — David Alan Black <dblack@...> 2000/11/14

Hello again --

[#6582] best way to interleaf arrays? — David Alan Black <dblack@...>

Hello --

15 messages 2000/11/26

[#6646] RE: Array Intersect (&) question — Aleksi Niemel<aleksi.niemela@...>

Ross asked something about widely known and largely ignored language (on

23 messages 2000/11/29
[#6652] RE: Array Intersect (&) question — rpmohn@... (Ross Mohn) 2000/11/29

aleksi.niemela@cinnober.com (Aleksi Niemel) wrote in

[#6723] Re: Array Intersect (&) question — Mathieu Bouchard <matju@...> 2000/12/01

> >Use a hash. Here's code to do both and more. It assumes that

[#6656] printing/accessing arrays and hashes — raja@... (Raja S.)

I'm coming to Ruby with a Python & Common Lisp background.

24 messages 2000/11/30

[ruby-talk:6617] Re: Question on sort!

From: "Conrad Schneiker" <schneik@...>
Date: 2000-11-29 06:50:16 UTC
List: ruby-talk #6617
Dave Thomas writes:

<Stuff about chaining methods.>

# It comes down to convenience. How often do you care is an array was
# modified by a sort? Ever? It would be more efficient to write
# Enumerable#sorted? to check, than to sort and see if it
# changed. Contrast that with the number of times it's convenient to
# chain another method to a sort (I do it all the time). It's
# unfortunate that a rarely used side-effect means that I can't sort in
# place reliably under these circumstances.
# 
# gsub! and sub! give information that's fairly expensive to determine
# any other way when they return nil. reverse! and sort! don't.
# 
# I'd vote for an end to the convention.

Isn't this just a vote in favor of supporting a form of functional 
programming (or at least functional composition) as the (new) default 
convention, except in special cases of gross inefficiency or clumsiness? 
If so, I'd like to cast a few recounted votes for this too.

If it were not for way-too-serious-to-ignore backwards compatibility 
issues, I'd maybe like to see gsub!! and sub!! for the nil variants, and 
have gsub! and sub! follow the (hopefully) new convention.

Conrad Schneiker
(This note is unofficial and subject to improvement without notice.)

In This Thread

Prev Next