R
Roy Smith
Perl is the only language I know of where you can invert the body and
test of a condition, i.e. "exit 1 if $error'" instead of "if ($error) {
exit 1};". What's the history behind that? Are there other languages
which let you write conditionals like that? Did Perl invent that, or
borrow it from some earlier language?
Please note, I'm not interested in debates about whether this is good or
bad, I'm just looking for the history/chronology/etymology of the
construct.
test of a condition, i.e. "exit 1 if $error'" instead of "if ($error) {
exit 1};". What's the history behind that? Are there other languages
which let you write conditionals like that? Did Perl invent that, or
borrow it from some earlier language?
Please note, I'm not interested in debates about whether this is good or
bad, I'm just looking for the history/chronology/etymology of the
construct.