I do not know.
personally shorter is not a good measure to me.
When I spend time understanding code I prefer simpler to understand than cryptic.
Now I will have to check what is stored exactly and its meaning.


Stef
what about leftIndex? it's shorter

On Tue, Mar 31, 2015 at 12:53 PM, Thierry Goubier
<thierry.goub...@gmail.com> wrote:
Le 31/03/2015 11:04, stepharo a écrit :
Hi

in Pharo 50 I would like to improve the AST API.
often we do not know if an instance variable holds a position or a node
and this should be clear.
For example I propose to have leftPosition instead of left.

If you like.

Does anybody has a better suggestion?

Well, I'm allways under the assumption that an instance variable is internal
only and that, when querying an AST node, I should allways use its API (is
that usually #startPosition and #stopPosition?).

This is really annoying to have to look at the users of an instance
variable to understand  its role.

Or have a well commented class to understand its role? It is not allways
possible to have instantaneously understandable instance variable names.

Thierry






Reply via email to