>I'm still somewhat ambivalent about this, myself.  My previous
>experience with hyphens in identifiers is chiefly in languages that
>don't generally have algebraic expressions, e.g. LISP, XML, so it will
>take some getting used to in Perl.  But at least in Perl's case the
>subtraction conflict is mitigated by the fact that many subtraction
>expressions will involve sigils;  $x-$y can't possibly be a single
>identifier.

People use nonadic functions (nonary operators? where non = 0, not 9)
without parens, and get themselves into trouble for it.

    % perl -E 'say time-time'
    0

    % perl -E 'say time-do{sleep 3; time}'
    -3

    % perl -E 'say time +5'
    1218475824

    % perl -E 'say time -5'
    1218475817

    % perl -E 'say time(-5)'
    syntax error at -e line 1, near "(-"
    Execution of -e aborted due to compilation errors.
    Exit 19

--tom

Reply via email to