GOTO Kentaro (gotoken / math.sci.hokudai.ac.jp) wrote: > In message "[ruby-talk:9201] Re: what about this begin?" > on 01/01/12, "Franz GEIGER" <fgeiger / datec.at> writes: > >So why isn't it called 'try'? > > >> > Hiyas. I am a bit puzzled about the use of 'do', 'begin' and 'end'. Why > > Maybe `try' sounds challenging. In usual case, an exception is just > an exception, not an outcome of a challenge. Indeed, `resuce' in > begin-end is optional. I actually prefer begin ... end to try ... except ... finally or what-have-you for similar reasons. 'Try' sort of implies that execution is expected to fail, and that exceptions are the normal case, whereas begin/end emphasizes the single-entry, single-exit nature of the block, where normal execution is the standard and where exceptions are, well, exceptions. And I may be wrong, but my impression is that exceptions are (ab)used as non-local gotos far less in Ruby than in many other languages. Of course, like most language issues, this is fairly subtle, and YMMV. And I guess I'm showing my Eiffel background. :) Reimer Behrends