From: jtc@... (Jim Cochrane) Date: 2001-01-28T11:40:07+09:00 Subject: [ruby-talk:10002] Re: line continuation In article , Avi Bryant wrote: > > >On Sun, 28 Jan 2001, Harry Ohlsen wrote: > >> While it's nice that you can do this, can someone explain why it is >> that the Ruby parser can't work out that a statement is not finished, >> as, say, a C++ or Java parser can? > >Very simple - C++ and Java make you end every statement with a semicolon. >This makes parsing much *easier* for them - Ruby has to do a little more >work, but it can't read your mind... > I think the answer is more complex than that and has to do with the allowed language constructs (as pointed out in a previous post). As a counter example, Eiffel does not require statements to end with a semi-colon and also allows a statement to be spread out over several lines (without a \). -- Jim Cochrane jtc@dimensional.com