[erlang-questions] Which choice is better? Function or Case

Garrett Smith g@REDACTED
Sat Mar 9 18:22:07 CET 2013


On Sat, Mar 9, 2013 at 10:39 AM, Bengt Kleberg
<bengt.kleberg@REDACTED> wrote:
> Greetings
>
> Yesterday I found myself wishing for a one letter variable name. The code said " unitname ", but what was wanted was unit identity. A single letter would have been less missleading.

There should be a Mechanical Turk service where you can paste your
function and then get a max-voted-up recommended spelling. It'd be a
great outlet for OCD plagued programmers like myself to spend Saturday
mornings over coffee :)

It does come down to common sense. If a single letter variable is not
clear, throw in a few extra.

This is why I like the "obvious" standard. It's of course subjective,
but it's something a group of programmers can converge on, and then
work toward. The result is hopefully one of Joe's "very hard"
iterations of correctness and maintainability.

Garrett



More information about the erlang-questions mailing list