This issue asks whether we should make true and false reserved keywords in Chapel. I believe we didn't originally because C didn't. But as Paul @cassella points out in this comment on issue #11174, we're increasingly in the minority. And arguably, these seem as primitive as integer literals, floating point literals, string literals, etc. which can't be re-assigned.
Just wanted to leave a comment to push my "make X a reserved keyword" agenda :)
Yes, I think true and false should be keywords. As @cassella pointed out, I don't want to have the chance of true evaluating to false :)
The only reason C didn't reserve true and false was because of history. We really wanted to reserve them like C++ did. However, because they were new to the language in 1999, many people had already created their own header files with their own definitions of true and false, and we wanted their code to continue to compile.
This is a long way of saying that the reasons C didn't reserve them do not apply to Chapel.
I was hoping you'd say that...
BTW, there are now rumblings in the C committee about reserving them there, now that people have had nearly 20 years to adapt.
Most helpful comment
Just wanted to leave a comment to push my "make X a reserved keyword" agenda :)
Yes, I think
trueandfalseshould be keywords. As @cassella pointed out, I don't want to have the chance oftrueevaluating tofalse:)