[#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:6654] Re: rescue clause affecting IO loop behavior

From: cjon@... (Cullen J O'neill)
Date: 2000-11-29 23:10:02 UTC
List: ruby-talk #6654
David Alan Black (dblack@candle.superlink.net) wrote:
> Maybe it's just because I was not expecting the current behavior, and
> therefore saw it in a somewhat negative light when I discovered it...
> but I tend to think that a begin/end block should behave the same way,
> with regard to its modifiers, whether it contains a rescue clause or
> not.  Or, if an exception-handling begin/end block is really a
> different thing from a regular begin/end block, then perhaps the
> modifiers should be illegal.  The thing that is confusing, in my view,
> is to allow the modifiers but not have the whole thing behave in the
> expected "expression-modifier-boolean" way.

I agree with this, except when it comes to the word 'illegal'.  Too many
programs have probably been written that MAY have used it.  And nobody
wants to upgrade if half their stuff will break.

If it could be officially disparaged and a warning could be issued when
it is encountered by ruby (which could be turned off with a no warnings
command line switch) I think that would be good.  Similarly I think the
same should be done for a single statement followed by while() since it
has the same behavior (a wart IMHO).

--
Is there a mechanism already in place for disparaged language features?
If not, shouldn't there be?

--
While we're on the topic of things that bother me, <G>
The construct:

unless (COND)
  # do thing 1
else
  # do thing 2
end

is such a brain twister, it seems unecessary.  I don't know, maybe I'll
get used to it (but I doubt it).  I think using else with unless should
also be disparaged.


Cullen J O'Neill
--
cjon@engin.umich.edu

In This Thread