On 2/28/13 1:57 AM, Walter Bright wrote:
On 2/27/2013 8:01 PM, John Colvin wrote:
Why must sentinel be known at compile time? I don't see what's in the
way of it
being a runtime argument.

Performance!

It should be usable as a case in a switch statement.

Isn't it possible for the optimizer to inline the function call and then combine the next ifs?

if (isSentinel(value)) {
} else {
  switch(value) {
  case ...
  }
}

Reply via email to