Good remark. We plan to have AST support for code editing and navigation in 3.0 so we could really change the metric and use a complexity metric.
Counting the number of if statements Stef > Hi, > > The way Nautilus colors method source panes is absolutely great: if reminds > you of paying attention to long methods in a gentle way. > > However, right now the metric is 'number of characters in method source', > while it should be more related to complexity. > > For example, using long names for variables or messages will be counted as > negative towards this metric. Worse even, lots of comments, which is good > most of the time, also counts as negative. > > Number of nodes in the AST would be one solution, but maybe a too expensive > one. > > Maybe quickly scanning for tokens while skipping whitespace and comments and > then counting the tokens would be doable ? > > Sven > > -- > Sven Van Caekenberghe > http://stfx.eu > Smalltalk is the Red Pill > > > >
