In the first time there was only return instead of $iif($isid,return,say), so the alias could only be used as an identifier ("function") that returns the result to the calling command.

For example, it could be used in an On input script:

On *:input:#:{
  • if /* !iswm $1 && !$ctrlenter {
    say $reverse($1-)
    halt
    }
}


But now it's more flexible. After $reverse() finishes processing the text, an $iif() is deciding what to do with the result - either /return it to the calling command, or /say it directly to the channel. The $iif() condition makes use of $isid, which holds $true when 'reverse' is called as an $identifier, and $false if it was called as a /command.