Why are comparison operators in Red natives, not actions? #333
Labels
status.built
A change in codebase has been done to address the ticket.
type.review
Ticket describes a possible improvement.
Milestone
While attempting to document natives and actions, I was struck by the fact that arithmetic operators (
add
etc.) are actions, whereas comparison operators (equal?
etc.) are natives, which are translated into calls tonatives/equal?*
etc. Each of these dispatches to a call ofnatives/compare
, which in its turn callsactions/compare
which performs the actual comparison by calling on thecompare
function of the appropriate type. This seems a bit roundabout. Or have I missed a subtlety?The text was updated successfully, but these errors were encountered: