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

From: "Hal E. Fulton" <hal9000@...>
Date: 2000-11-30 12:55:41 UTC
List: ruby-talk #6673
See below.

----- Original Message ----- 
From: Andrew D. McDowell <drew@localhost.localdomain.web-hosting.com>
To: ruby-talk ML <ruby-talk@netlab.co.jp>
Sent: Wednesday, November 29, 2000 10:10 PM
Subject: [ruby-talk:6666] Suggestion for addition to Begin/End syntax


> Hi all.
> I'm very new to Ruby so this might be a bit of a shot in the dark, 
> but I'd like to suggest a minor change in the block 'end' syntax
> that may help readability.
> It's not a new idea, but it's something that I found helpfull
> when reading Dylan code:
> 
> When the 'end' statement is used to close a code block, allow an
> optional word or two of description.
> They can be ignored by the interpreter, but it'd be usefull for 
> debugging for them to be matched. 
> 
> Basicaly, any of the following would be acceptable:
> 
> def foo()
>   print "Foo!\n"
> end 
> 
>  -or-
> 
> def foo()
>   print "Foo!\n"
> end def 
> 
>  -or-
> 
> def foo()
>   print "Foo!\n"
> end foo 
> 
>  -or-
> 
> def foo()
>   print "Foo!\n"
> end def foo
> 

I like the idea, Drew, and I brought up something like it myself once.

BUT... my understanding is that this feature used to be in Ruby (long
ago?) and was removed... the reason being the existence of 
modifiers such as until, if, etc.

begin
  # ...
end until x > 0

So comments might be the best way to achieve this. I don't like that
approach, though, and have decided to rely on indentation. This also
motivates me to keep blocks short (as they should be).

Hal Fulton



In This Thread