<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">I am potentially ok with this. One thing to consider, however, is that C++ (should we ever go in this direction) enum and int don't play nicely together. Someone might even "wrap" Thorium computations in C++ at some point, which means we will want the code to pass through the C compiler without errors. I'm not sure whether this was intentional, but you also don't have an enum type name in your example.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">So I would be careful with enum, because in C, they convert implicitly to/from int. That said, I do like being able to get the auto-increment functionality out of the box. I can be talked into it, but were I to guess, Andy Tanenbaum did what we did today in Minix for good reasons (possibly still living in his head!)</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Best,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">George</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>George K. Thiruvathukal, PhD<br></div><div style="font-size:12.7272720336914px"><div style="font-size:12.7272720336914px"><i style="font-size:12.7272720336914px">Professor of Computer Science</i><span style="font-size:12.7272720336914px">, Loyola University Chicago</span><br></div><div style="font-size:12.7272720336914px"><span style="font-size:12.7272720336914px"><i>Director</i>, Center for Textual Studies and Digital Humanities</span></div><div style="font-size:12.7272720336914px"><span style="font-size:12.7272720336914px"><i>Guest Faculty</i>, Argonne National Laboratory, Math and Computer Science Division</span></div><div style="font-size:12.7272720336914px"><div style="font-size:12.7272720336914px">Editor in Chief, <a href="http://www.computer.org/portal/web/computingnow/cise" target="_blank">Computing in Science and Engineering</a> (IEEE CS/AIP)<br></div><div><span style="font-size:12.7272720336914px">(w) <a href="http://gkt.tv/" target="_blank">gkt.tv</a> </span><span style="font-size:12.7272720336914px">(v) 773.829.4872</span><br></div><div><span style="font-size:12.7272720336914px"><br></span></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Nov 5, 2014 at 9:08 PM, Boisvert, Sebastien <span dir="ltr"><<a href="mailto:boisvert@anl.gov" target="_blank">boisvert@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi George,<br>
<br>
The new action definitions that use a base and an offset is great [1].<br>
<br>
#define ACTOR_ACTION_BASE -1000<br>
<br>
#define ACTION_START (ACTOR_ACTION_BASE + 0)<br>
#define ACTION_START_REPLY (ACTOR_ACTION_BASE + 1)<br>
#define ACTION_STOP (ACTOR_ACTION_BASE + 2)<br>
#define ACTION_STOP_REPLY (ACTOR_ACTION_BASE + 3)<br>
#define ACTION_ASK_TO_STOP (ACTOR_ACTION_BASE + 4)<br>
#define ACTION_ASK_TO_STOP_REPLY (ACTOR_ACTION_BASE + 5)<br>
<br>
<br>
I was told by a friend (from industry) of mine that the following would be better:<br>
<br>
enum {<br>
ACTOR_ACTION_BASE = -1000,<br>
ACTION_START,<br>
ACTION_START_REPLY,<br>
ACTION_STOP,<br>
ACTION_STOP_REPLY,<br>
ACTION_ASK_TO_STOP,<br>
ACTION_ASK_TO_STOP_REPLY<br>
};<br>
<br>
<br>
What do you think ?<br>
<br>
<br>
---<br>
[1] <a href="https://github.com/gkthiruvathukal/biosal/commit/8e0448d4c98babd9e471d134745791165fb08536" target="_blank">https://github.com/gkthiruvathukal/biosal/commit/8e0448d4c98babd9e471d134745791165fb08536</a></blockquote></div><br></div>