Austin. Pause. Take a deep breath. Let it out slowly. You are
misunderstanding what has been discussed, and what has been
implemented. There is no need for panic.
What people are suggesting is a way to help them find missing
'end's in their code. At present, the error message is not particularly
helpful. It gives no indication of where the problem might be. So what
we have done is prototyped a way to guess where the error might be,
based on common patterns of indentation. That is all.
* It does not enforce, coerce, mandate, or even recommend any
particular indentation style.
* It does not alter the interpretation of any ruby program.
* It does not generate any messages unless the program fails to
parse, and only then in the case where a missing 'end' or '}' is
likely. In that case, all it does is add a list of line numbers
to the message (as warnings) indicating a small number of places
where the error might be.
When I am writing code, I will often do:
class Foo
def bar
: # some code here
p baz # a tracer to help me find a difficult bug
: # more code here
end
end
And you may freely continue to do so. No one is saying otherwise.
Your suggestion would force me to indent the tracer -- which I have
*purposefully* overridden the auto-formatting by vim to insert --
which leads me to the same idiocy that keeps me from Python as a first
point.
There are several interesting points to discuss here, but I fear
to raise them lest I upset you further. Perhaps later, once your main
concerns have been addressed.
Tracer code is too useful to be bound by people who don't use editors
that help them write their code through use of automatic indentation
and/or folding.
If you are using automation tools to help you write code presumably
you have other, better ways of localizing missing 'end's. So you would
never even see the warnings. If you (or others who code like you) would
like the messages to be helpful to them as well, I suspect there may be
a simple heuristic or two that would handle it. The indentation-reader
uses a _very_ loose definition of salience already, to accommodate the
wide range of styles found in the code I looked at.
This whole indentation-count idea is dumb.
I agree that the idea you are reacting to may be is dumb, or at
least ill advised in this context. But that is not the idea under
discussion. If possible, I would be interested in hearing your thoughts
on the actual idea, which is laid out here:
http://blade.nagaokaut.ac.jp/ruby/ruby-core/3486
(including a link to my first attempt at implementing such as system).
-- Markus