On 1/10/07, Charles Manning <[EMAIL PROTECTED]> wrote:
> This is somewhat of a taste issue.
>
> I don't like the use of enums for values with a physical meaning that needs
> translation from enum space into physical space because this is wasteful and
> confusing and error prone. I think enums are great for abstract values with
> no physical meaning eg. state machine states etc.

Fair enough. I'm neutral on that at this point. My pet dislike of
preprocessor defines is when you have half a dozen #define blocks in
the same include file, and that it becomes hard to see which set of
defines applies to which parameter of which function. In that case, an
enum can help tie each set of values to a specific meaning.

In this case however, there is no real confusion on the possible
mappings, so I'm fine with it.

> My absolute pet hate usage of enum that I have seen is...

Ouch. That made my eyes bleed a bit. Far from me the thought of
defining an enum with irq_prio_[1-8].

> I have a very good reason for doing this....
>
> I am sometimes a lazy slob!
>
> Every now and then I see the warning fly past as I compile and I think hey I
> should fix that, then that lazy slob that lives inside my body takes over
> again!

Heh. That is a very good reason indeed. If I can overcome the slob
that lives inside me, I'll submit a patch that corrects these
warnings. I just asked in case where was another profound reason that
I might have missed.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lejos-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lejos-discussion

Reply via email to