From: dblack@... Date: 2006-07-30T01:54:27+09:00 Subject: Re: Wild ideas: Finding a missing 'end' Hi -- On Sun, 30 Jul 2006, kate rhodes wrote: > The problem with using indentation to even guess at an area in pretty much > any language other than python is that it would require a huge amount of > logic to account for the myriad possible edge cases. > > What happens when a user mixes tabs and spaces? > If one line is indented 3 spaces and the next is 4 is that a typo or is it > an intentional indication of a subsection? > What happens when there's a long method call that the developer has decided > to indent a portion of on a second line instead of having the thing stretch > way off to the right of the typical viewing area? > > You could go on and on and on and on with screwed up cases like this? Either > you write something complex enough to figure out what the hell us crazy > humans meant or you get misleading results which in my opinion is worse than > no results. > > Remember, a solution in the Ruby core has to work for all users not just the > users who happen to have good and consistent indentation habits. The solution could be to give a specific hint if it's a simple case, and not if it isn't :-) David -- http://www.rubypowerandlight.com => Ruby/Rails training & consultancy ----> SEE SPECIAL DEAL FOR RUBY/RAILS USERS GROUPS! <----- http://dablog.rubypal.com => D[avid ]A[. ]B[lack's][ Web]log http://www.manning.com/black => book, Ruby for Rails http://www.rubycentral.org => Ruby Central, Inc.