aurapm/aura — pull request #256 by aspidites (2014-07-05 21:05:52+00:00)
Title: [Discussion] Case vs Pattern Matches

In this branch I replaced the pattern matching with case statements. I did so for both technical and aesthetic reasons:

Technical:
* By using cases, I was able to have let bindings that wrapped the entire result, which allowed me to abstract over common patterns (`bt foo` for example)
* I was able to apply the same logic to pass the result of the case statement to a colourizer function.

Aesthetic:
* A lot of lines were made shorter by doing this, which also allowed me to reduce some of them to less than 80 characters, which is great when working in a terminal.
* I think it's both cleaner and clearer.

Two non-consmetic changes I did make were to the `pkgBuildKeyMissing` function:
1. I renamed it `pkgbuildKeyMissing` as it seemed inconsistent with the other occurrences of `pkgbuild`.
2. I swapped the first in second arguments, as in literally every other function, `Language` is the last argument, not the first.
I again struggled with indentation, so I won't be offended if you ask me to change that in some way. In fact, as this was mostly an experiment, I wouldn't be offended if you rejected the entire proposal.