[#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:6674] Re: Suggestion for addition to Begin/End syntax

From: drew@... (Andrew D. McDowell)
Date: 2000-11-30 13:40:05 UTC
List: ruby-talk #6674
In article <200011300637.BAA12852@yashi.com>, Yasushi Shoji wrote:
>
>if end modifier(??) is optional how about
>
>def foo
>  print "hello\n"
>end #foo
>

Well, _Ideally_ it would help the interpreter provide more usefull 
error messages.
For example, it would really help in the case of the following:

def foo(a)
  if a < 0
    while a < 1
      #do something
      #  <---- Oh no, I forgot to close this while block!
      #  <---- The logical error is here
  end #if
  if a > 0
    while a > 0
      #do something
    end #while
  end #if
  if a == 0
    print "A is 0!\n"
  end #if
end #def
         <---- The Interpreter says the error is here.

Now imagine something like the above with 200 more lines of code
between the end of the while block, and the end of the def block.

Because the 'end modifier' (sheez..what should this thing be called?)
would have to match the block it's closing, the interpreter could 
recognise that you were closing the wrong block.

Does this make sense?

-Drew




In This Thread