Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 2
    The other thing to cover is the use of lookup tables rather than switches. Commented Mar 17, 2017 at 16:12
  • 1
    I added a section, "Alternatives", that hopefully addresses this. Commented Mar 17, 2017 at 16:36
  • 1
    I don't think you addressed it; presumably @SteveBarnes meant to replace the switch statement with data, e.g. a map converting compass direction to compass points: points['N'] = 0; points['NNNE'] = 1; ... Commented Mar 17, 2017 at 21:48
  • Exactly @kevincline Commented Mar 17, 2017 at 21:56
  • That's a great response, but I don't think it answers the question. The switch statement was meant as an example. I am talking about ways to measure complexity for humans. In particular I wonder whether there is a way to in a measure include the fact that two functions are really just length-extensions. In an extreme case just a return someFunc(scopevariables...). Commented Mar 17, 2017 at 23:23